using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;
using Microsoft.Office.Interop.Excel;
using SM.core;
using SS;
using SS.core;
using SS.dir;
using System;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Threading;
using System.Windows.Forms;
using TVSBH.core;
using TVSGPP.dir;
using TVSGPP.func;
using TVSGPP.sys;
namespace TVSBH.func
{
	public class frmStockForward : Form
	{
		private Func objFunc = new Func();
		private frmWaitting objW;
		private System.Data.DataTable objTable = new System.Data.DataTable();
		private System.Data.DataTable objTableBill = new System.Data.DataTable();
		private Bill objBill = new Bill();
		private Partner objPartner = new Partner();
		public string userName = "";
		public string fullName = "";
		public string currVAT = "0";
		private string currPid = "";
		private string cusAddress = "";
		private string cusPhone = "";
		private string perfixOut = "";
		private products objProduct = new products();
		private bool sellOnPublicPrice = false;
		private bool updateDataWithSlideShow = false;
		private bool noAllowOtherEditBill = false;
		private bool isPostBack = false;
		private bool AllowSellExpired = false;
		private bool BasePrice = false;
		private bool AllowSellSuppen = false;
		private bool AllowDouble = false;
		private bool AllowExportWhenOuput = false;
		private double currPrice = 0.0;
		private double currRate = 1.0;
		private int currIndex = -1;
		private int slideShowIndex = -1;
		private int Direction = 1;
		private int saveInterval = 0;
		private int saveIntervalCondition = 0;
		private IContainer components = null;
		private System.Windows.Forms.GroupBox groupBox1;
		private System.Windows.Forms.TextBox txtID;
		private System.Windows.Forms.Label label1;
		private DateTimePicker txtDate;
		private System.Windows.Forms.Label label2;
		private ComboBox cbbProvider;
		private System.Windows.Forms.Label label5;
		private System.Windows.Forms.Label label6;
		private System.Windows.Forms.TextBox txtDebt;
		private System.Windows.Forms.TextBox txtTotalMoney;
		private System.Windows.Forms.Label label7;
		private System.Windows.Forms.TextBox txtNote;
		private DataGridView dgvProduct;
		private System.Windows.Forms.TextBox txtProductName;
		private System.Windows.Forms.TextBox txtProductUnit;
		private System.Windows.Forms.TextBox txtProductMoney;
		private System.Windows.Forms.Label label12;
		private System.Windows.Forms.TextBox txtProductNumber;
		private System.Windows.Forms.TextBox txtProductPrice;
		private System.Windows.Forms.Label label15;
		private DateTimePicker dptProductExpiryDate;
		private System.Windows.Forms.Label label16;
		private DateTimePicker dtpProductDate;
		private System.Windows.Forms.Button btnAddToBill;
		private System.Windows.Forms.Button btnSelect;
		private System.Windows.Forms.Button btnAdd;
		private System.Windows.Forms.Button btnEdit;
		private System.Windows.Forms.Button btnSave;
		private System.Windows.Forms.Button btnPrint;
		private System.Windows.Forms.Button btnDel;
		private System.Windows.Forms.Button btnClose;
		private DataGridView dgvBill;
		private System.Windows.Forms.GroupBox groupBox3;
		private ComboBox cbbPacket;
		private System.Windows.Forms.Label label18;
		private ComboBox cbbNational;
		private System.Windows.Forms.TextBox txtBalancer;
		private System.Windows.Forms.Label label21;
		private System.Windows.Forms.TextBox txtBarcode;
		private System.Windows.Forms.TextBox txtMoneyAfterDiscount;
		private System.Windows.Forms.TextBox txtDiscountOut;
		private System.Windows.Forms.Label label22;
		private System.Windows.Forms.Button btnSearch;
		private System.Windows.Forms.Label lblPossName;
		private System.Windows.Forms.Label label3;
		private System.Windows.Forms.Button btnListUnit;
		private ContextMenuStrip cmsBill;
		private ToolStripMenuItem cmsDelProduct;
		private ToolStripSeparator toolStripSeparator1;
		private ToolStripMenuItem cmsAddBill;
		private ToolStripMenuItem cmsEditBill;
		private ToolStripSeparator toolStripSeparator2;
		private ToolStripMenuItem cmsSaveBill;
		private ToolStripMenuItem cmsPrintBill;
		private ToolStripMenuItem cmsDellBill;
		private ToolStripSeparator toolStripSeparator3;
		private ToolStripMenuItem cmsSearchBill;
		private ToolStripMenuItem cmsAddProduct;
		private ToolStripSeparator toolStripSeparator4;
		private System.Windows.Forms.Button btnAddCustomer;
		private System.Windows.Forms.Label label25;
		private System.Windows.Forms.Label label17;
		private System.Windows.Forms.Button btnSearchTime;
		private DateTimePicker dtpTo;
		private DateTimePicker dtpFrom;
		private System.Windows.Forms.TextBox txtBalancerAllPacket;
		private System.Windows.Forms.Label label20;
		private System.Windows.Forms.Label label23;
		private ComboBox cbbWareHouse;
		private System.Windows.Forms.Label label26;
		private System.Windows.Forms.GroupBox groupBox4;
		private System.Windows.Forms.Label label8;
		private System.Windows.Forms.Label label9;
		private System.Windows.Forms.Label label10;
		private System.Windows.Forms.Button lblProduct;
		private System.Windows.Forms.Button lblPrice;
		private System.Windows.Forms.Button lblMoney;
		private System.Windows.Forms.Button lblNumber;
		private System.Windows.Forms.Button lblUnit;
		private System.Windows.Forms.Button lblPacket;
		private System.Windows.Forms.TextBox txtMoney;
		private System.Windows.Forms.Label label27;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn1;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn7;
		private DataGridViewTextBoxColumn Column10;
		private DataGridViewTextBoxColumn Column11;
		private DataGridViewTextBoxColumn Column12;
		private DataGridViewTextBoxColumn Column13;
		private DataGridViewTextBoxColumn Column14;
		private DataGridViewTextBoxColumn Column19;
		private DataGridViewTextBoxColumn Column20;
		private DataGridViewTextBoxColumn Column21;
		private ToolTip toolTip1;
		private System.Windows.Forms.Button btnExport;
		private System.Windows.Forms.TextBox txtProductPrice1;
		private System.Windows.Forms.TextBox txtProductPrice2;
		private System.Windows.Forms.Label label4;
		private ComboBox cbbWareHouseTerget;
		private DataGridViewTextBoxColumn Column2;
		private DataGridViewTextBoxColumn Column1;
		private DataGridViewTextBoxColumn Column3;
		private DataGridViewTextBoxColumn Column5;
		private DataGridViewTextBoxColumn Column4;
		private DataGridViewTextBoxColumn Column6;
		private DataGridViewTextBoxColumn Column7;
		private DataGridViewTextBoxColumn Column8;
		private DataGridViewTextBoxColumn Column9;
		private DataGridViewTextBoxColumn Column15;
		private DataGridViewTextBoxColumn Column16;
		private DataGridViewTextBoxColumn Column17;
		private DataGridViewTextBoxColumn VAT;
		private DataGridViewTextBoxColumn possName;
		private ContextMenuStrip ctmJustBill;
		private ToolStripMenuItem ctmJustBillAdd;
		private ToolStripMenuItem ctmJustBillEdit;
		private ToolStripMenuItem ctmJustBillPrint;
		private ToolStripSeparator toolStripSeparator5;
		private ToolStripMenuItem ctmJustBillDel;
		private ToolStripSeparator toolStripSeparator6;
		private ToolStripMenuItem ctmJustBillSearch;
		private System.Windows.Forms.Button btnStopSlide;
		private System.Windows.Forms.Timer timer2;
		private System.Windows.Forms.Timer timer1;
		private void showWatting()
		{
			this.objW = new frmWaitting();
			this.objW.ShowDialog();
			Thread.Sleep(40);
		}
		public frmStockForward()
		{
			this.InitializeComponent();
		}
		private void frmInput_Load(object sender, EventArgs e)
		{
			try
			{
				this.objFunc.LoadComboBox("SELECT [CusID] , UPPER(Name) AS Name FROM [TabPartner] WHERE [IsCustomer] = 1", this.cbbProvider, "CusID", "Name");
				this.objFunc.LoadComboBox("SELECT [ID] , UPPER(Name) AS Name FROM [TabNational] ORDER BY [Name] ", this.cbbNational, "ID", "Name");
				this.objFunc.LoadComboBox("SELECT WareHouse_ID, UPPER(WareHouse_Name) AS Name FROM TabWareHouse ORDER BY WareHouse_Name", this.cbbWareHouse, "WareHouse_ID", "Name");
				this.objFunc.LoadComboBox("SELECT WareHouse_ID, UPPER(WareHouse_Name) AS Name FROM TabWareHouse ORDER BY WareHouse_Name", this.cbbWareHouseTerget, "WareHouse_ID", "Name");
				this.getBill("");
				this.sellOnPublicPrice = this.objFunc.getSellOnPublicPrice();
				this.noAllowOtherEditBill = this.objFunc.getNoAllowOtherEditBill();
				this.AllowSellExpired = this.objFunc.getAllowSellExpired();
				this.BasePrice = this.objFunc.getBasePrice();
				this.perfixOut = this.objFunc.GetPerfixOut();
				this.AllowSellSuppen = this.objFunc.getAllowSellSuppen();
				this.AllowDouble = this.objFunc.getAllowDouble();
				this.AllowExportWhenOuput = this.objFunc.getAllowExportWhenOuput();
				this.btnAdd.PerformClick();
			}
			catch (Exception ex)
			{
				MessageBox.Show(ex.Message);
			}
		}
		private void btnClose_Click(object sender, EventArgs e)
		{
			base.Close();
		}
		private void frmInput_KeyDown(object sender, KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Escape)
			{
				base.Close();
			}
			else
			{
				if (e.KeyCode == Keys.F2)
				{
					this.btnSelect.PerformClick();
				}
				else
				{
					if (e.KeyCode == Keys.F3)
					{
						this.btnAddToBill.PerformClick();
					}
					else
					{
						if (e.KeyCode == Keys.F4)
						{
							this.btnAdd.PerformClick();
						}
						else
						{
							if (e.KeyCode == Keys.F5)
							{
								this.btnEdit.PerformClick();
							}
							else
							{
								if (e.KeyCode == Keys.F6)
								{
									this.btnSave.PerformClick();
								}
								else
								{
									if (e.KeyCode == Keys.F7)
									{
										this.btnPrint.PerformClick();
									}
									else
									{
										if (e.KeyCode == Keys.F8)
										{
											this.btnDel.PerformClick();
										}
										else
										{
											if (e.KeyCode == Keys.F9)
											{
												this.btnSearch.PerformClick();
											}
											else
											{
												if (e.KeyCode == Keys.F10)
												{
													this.btnExport.PerformClick();
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
		private void btnSelect_Click(object sender, EventArgs e)
		{
			if (this.btnSave.Enabled)
			{
				frmSelectProduct frmSelectProduct = new frmSelectProduct();
				frmSelectProduct.txtSearch.Text = this.txtProductName.Text;
				frmSelectProduct.Location = new System.Drawing.Point(this.txtProductName.Location.X + 94, this.txtProductName.Location.Y + 80);
				frmSelectProduct.ShowDialog();
				if (frmSelectProduct.productID != "")
				{
					this.currPid = frmSelectProduct.productID;
					this.txtBalancerAllPacket.Text = this.objProduct.balancerOfAllPack(this.currPid, this.cbbWareHouse.SelectedValue.ToString()).ToString();
					this.txtProductName.Text = frmSelectProduct.productName;
					this.txtProductUnit.Text = frmSelectProduct.unitName;
					this.currRate = 1.0;
					this.lblPossName.Text = frmSelectProduct.productPossName;
					try
					{
						if (this.BasePrice)
						{
							this.txtProductPrice.Text = this.objProduct.getPriceInCurrent(this.currPid).ToString();
							this.txtProductPrice1.Text = this.objProduct.getPriceOutBase(this.currPid, this.cbbPacket.SelectedValue.ToString()).ToString();
							this.txtProductPrice2.Text = this.objProduct.getPriceOutRetailCurrent(this.currPid).ToString();
						}
						else
						{
							this.txtProductPrice.Text = this.objProduct.getPriceInAVG(this.currPid).ToString();
							this.txtProductPrice1.Text = this.objProduct.getPriceOutputAVG(this.currPid).ToString();
							this.txtProductPrice2.Text = this.objProduct.getPriceOutRetailAVG(this.currPid).ToString();
						}
						this.currPrice = (double)float.Parse(this.txtProductPrice.Text.Replace(",", ""));
						this.cbbNational.SelectedValue = this.objProduct.getNationalID(this.currPid, this.cbbPacket.SelectedValue.ToString()).ToString();
					}
					catch
					{
						this.txtProductName.Text = "";
						this.txtProductUnit.Text = "";
						MessageBox.Show("Không tìm thấy lô hàng nào của sản phẩm được chọn\r\n\r\nChỉ những sản phẩm có số lô cụ thể mới được xuất kho", "Cảnh báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
						return;
					}
					this.txtProductNumber.Text = "0";
					this.cbbPacket.Focus();
				}
			}
		}
		private void txtProductNumber_TextChanged(object sender, EventArgs e)
		{
			double num = 0.0;
			if (this.txtProductNumber.Text != "")
			{
				try
				{
					num = double.Parse(this.txtProductNumber.Text);
				}
				catch
				{
					num = 0.0;
				}
				if (this.txtProductPrice.Text != "")
				{
					this.txtProductMoney.Text = string.Format(Program.lenAffterDecimal, num * double.Parse(this.txtProductPrice.Text));
				}
			}
			this.setStatusBtnAddToBill();
		}
		private void txtProductName_TextChanged(object sender, EventArgs e)
		{
			this.cbbPacket.DataSource = null;
			if (this.txtProductName.Text.Trim() != "")
			{
				this.objFunc.loadPacketIntoComboBox(string.Concat(new string[]
				{
					"SELECT DISTINCT [Packet], [ProductExpiryDate] FROM [TabDetailBill] WHERE [Pid] = ",
					this.currPid,
					" AND [Packet] IN (SELECT [Packet] FROM [TabTotalBalancer] WHERE [Pid] = ",
					this.currPid,
					" AND (productNumberIn > productNumberOut)) ORDER BY [ProductExpiryDate]"
				}), this.cbbPacket, "Packet", "Packet");
			}
			try
			{
				if (!this.AllowSellSuppen && this.txtProductName.Text != "")
				{
					if (this.objProduct.checkForSuppend(this.currPid, this.cbbPacket.SelectedValue.ToString()))
					{
						MessageBox.Show("Bạn đang chọn mặt thuốc\r\n\r\n" + this.txtProductName.Text + "\r\n\r\nThuộc danh mục thuốc cấm lưu hành nên không thể xuất kho", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
						return;
					}
				}
			}
			catch
			{
			}
			this.setStatusBtnAddToBill();
		}
		private void setStatusBtnAddToBill()
		{
			if (this.txtProductName.Text != "" && this.txtProductUnit.Text != "" && this.txtProductPrice.Text != "" && this.txtProductNumber.Text != "" && this.txtProductMoney.Text != "")
			{
				this.btnAddToBill.Enabled = true;
			}
			else
			{
				this.btnAddToBill.Enabled = false;
			}
		}
		private void btnAddToBill_Click(object sender, EventArgs e)
		{
			try
			{
				if (DateTime.Parse(this.dptProductExpiryDate.Value.ToShortDateString()) >= DateTime.Parse(DateTime.Now.ToShortDateString()) && !this.AllowSellExpired)
				{
					MessageBox.Show("Không thể bán sản phẩm đã quá hạn sử dụng!", "Cảnh báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
				}
				else
				{
					if (this.txtProductNumber.Text.Contains("-") || this.txtBalancer.Text.Contains("-"))
					{
						MessageBox.Show("Số lượng xuất và số lượng tồn phải không âm", "Cảnh báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
					}
					else
					{
						if (this.txtProductNumber.Text == "" || this.txtProductNumber.Text == "0")
						{
							MessageBox.Show("Nhập vào số lượng sản phẩm cần xuất kho", "Cảnh báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
							this.txtProductNumber.Focus();
						}
						else
						{
							if (this.cbbPacket.Text == "")
							{
								MessageBox.Show("Bạn chưa chọn lô hàng cần xuất!", "Cảnh báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
								this.cbbPacket.Focus();
							}
							else
							{
								double pricePublicBase = this.objProduct.getPricePublicBase(this.currPid, this.cbbPacket.Text);
								if (!this.sellOnPublicPrice && double.Parse(this.txtProductPrice.Text) > pricePublicBase)
								{
									MessageBox.Show("Giá bán hiện tại cao hơn giá đã niêm yết [" + string.Format(Program.lenAffterDecimal, pricePublicBase) + "]\r\n\r\nHệ thống không cho phép bán giá cao hơn giá đã niêm yết!", "Cảnh báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
								}
								else
								{
									float num = float.Parse(this.txtProductNumber.Text);
									float num2 = float.Parse(this.txtBalancerAllPacket.Text);
									float num3 = float.Parse(this.txtBalancer.Text);
									float num4 = 0f;
									if (num > num2)
									{
										MessageBox.Show("Số lượng xuất kho lớn hơn số lượng hàng còn trong kho", "Cảnh báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
										this.txtProductNumber.Text = this.txtBalancer.Text;
									}
									else
									{
										int num5 = this.checkInObjTable(this.currPid, this.cbbPacket.Text);
										if (num5 == -1 || this.AllowDouble)
										{
											if (num <= num3)
											{
												this.objTable.Rows.Add(new object[]
												{
													this.currPid,
													this.txtProductName.Text,
													this.txtProductUnit.Text,
													this.txtProductNumber.Text,
													this.txtProductPrice.Text,
													(double.Parse(this.txtProductNumber.Text.Replace(",", "")) * double.Parse(this.txtProductPrice.Text.Replace(",", ""))).ToString(),
													this.cbbPacket.Text,
													this.dtpProductDate.Value,
													this.dptProductExpiryDate.Value,
													this.txtProductPrice1.Text,
													this.txtProductPrice2.Text,
													this.cbbNational.SelectedValue.ToString(),
													this.currVAT,
													this.lblPossName.Text,
													this.currRate.ToString(),
													"",
													"",
													"",
													""
												});
											}
											else
											{
												num4 += num3;
												this.objTable.Rows.Add(new object[]
												{
													this.currPid,
													this.txtProductName.Text,
													this.txtProductUnit.Text,
													num3.ToString(),
													this.txtProductPrice.Text,
													(double.Parse(num3.ToString()) * double.Parse(this.txtProductPrice.Text.Replace(",", ""))).ToString(),
													this.cbbPacket.Text,
													this.dtpProductDate.Value,
													this.dptProductExpiryDate.Value,
													this.txtProductPrice1.Text,
													this.txtProductPrice2.Text,
													this.cbbNational.SelectedValue.ToString(),
													this.currVAT,
													this.lblPossName.Text,
													this.currRate.ToString(),
													"",
													"",
													"",
													""
												});
												try
												{
													SqlConnection sqlConnection = new SqlConnection(this.objFunc.strConnectionString);
													sqlConnection.Open();
													SqlCommand sqlCommand = sqlConnection.CreateCommand();
													sqlCommand.CommandText = string.Concat(new string[]
													{
														"SELECT DISTINCT [Packet], [ProductDate], [ProductExpiryDate], [NationalID], [VAT] FROM [TabDetailBill] WHERE [Pid] = ",
														this.currPid,
														" AND [Packet] <> '",
														this.cbbPacket.SelectedValue.ToString(),
														"' AND [Packet] IN (SELECT [Packet] FROM [TabTotalBalancer] WHERE [Pid] = ",
														this.currPid,
														" AND (productNumberIn > productNumberOut)) ORDER BY [ProductExpiryDate] DESC"
													});
													SqlDataReader sqlDataReader = sqlCommand.ExecuteReader();
													while (sqlDataReader.Read() && num4 < num)
													{
														float num6 = this.objProduct.balancerOfPack(this.currPid, sqlDataReader["Packet"].ToString(), this.cbbWareHouse.SelectedValue.ToString());
														if (num6 >= num - num4)
														{
															this.objTable.Rows.Add(new object[]
															{
																this.currPid,
																this.txtProductName.Text,
																this.txtProductUnit.Text,
																(num - num4).ToString(),
																this.txtProductPrice.Text,
																(double.Parse((num - num4).ToString()) * double.Parse(this.txtProductPrice.Text.Replace(",", ""))).ToString(),
																sqlDataReader["Packet"].ToString(),
																sqlDataReader["ProductDate"].ToString(),
																sqlDataReader["ProductExpiryDate"].ToString(),
																this.txtProductPrice1.Text,
																this.txtProductPrice2.Text,
																sqlDataReader["NationalID"].ToString(),
																sqlDataReader["VAT"].ToString(),
																this.lblPossName.Text,
																this.currRate.ToString(),
																"",
																"",
																"",
																""
															});
															num4 += num - num4;
														}
														else
														{
															num4 += num6;
															this.objTable.Rows.Add(new object[]
															{
																this.currPid,
																this.txtProductName.Text,
																this.txtProductUnit.Text,
																num6.ToString(),
																this.txtProductPrice.Text,
																(double.Parse(num6.ToString()) * double.Parse(this.txtProductPrice.Text.Replace(",", ""))).ToString(),
																sqlDataReader["Packet"].ToString(),
																sqlDataReader["ProductDate"].ToString(),
																sqlDataReader["ProductExpiryDate"].ToString(),
																this.txtProductPrice1.Text,
																this.txtProductPrice2.Text,
																sqlDataReader["NationalID"].ToString(),
																sqlDataReader["VAT"].ToString(),
																this.lblPossName.Text,
																this.currRate.ToString(),
																"",
																"",
																"",
																""
															});
														}
													}
													sqlDataReader.Close();
													sqlConnection.Close();
													sqlConnection.Dispose();
												}
												catch (Exception ex)
												{
													MessageBox.Show(ex.Message);
												}
											}
											this.dgvProduct.Refresh();
											this.txtMoney.Text = string.Format(Program.lenAffterDecimal, this.checkMoneyOfBill());
										}
										else
										{
											this.updateObjTable(num5);
											this.txtMoney.Text = string.Format(Program.lenAffterDecimal, this.checkMoneyOfBill());
										}
										try
										{
											double num7 = double.Parse(this.txtMoney.Text) * double.Parse(this.txtDiscountOut.Text) / 100.0;
											this.txtMoneyAfterDiscount.Text = string.Format(Program.lenAffterDecimal, num7);
										}
										catch
										{
											this.txtMoneyAfterDiscount.Text = "0";
										}
										try
										{
											double num7 = double.Parse(this.txtMoney.Text) - double.Parse(this.txtMoney.Text) * double.Parse(this.txtDiscountOut.Text) / 100.0;
											this.txtTotalMoney.Text = string.Format(Program.lenAffterDecimal, num7);
										}
										catch
										{
											this.txtTotalMoney.Text = "0";
										}
										if (this.txtBarcode.Text == "")
										{
											this.resetControl();
											this.txtProductName.Focus();
										}
										else
										{
											this.txtBarcode.Text = "";
											this.txtBarcode.Focus();
										}
									}
								}
							}
						}
					}
				}
			}
			catch (Exception ex)
			{
				MessageBox.Show(ex.Message);
			}
		}
		private int checkInObjTable(string Pid, string packet)
		{
			int num = -1;
			int result;
			for (int i = 0; i < this.objTable.Rows.Count; i++)
			{
				if (this.objTable.Rows[i]["Pid"].ToString() == Pid && this.objTable.Rows[i]["Packet"].ToString() == packet)
				{
					num = i;
					result = num;
					return result;
				}
			}
			result = num;
			return result;
		}
		private void resetControl()
		{
			this.txtProductNumber.Text = "";
			this.txtProductName.Text = "";
			this.txtProductUnit.Text = "";
			this.txtProductPrice.Text = "";
			this.txtProductMoney.Text = "";
			this.txtBalancer.Text = "0";
			this.txtBalancerAllPacket.Text = "0";
			this.txtDiscountOut.Text = "0";
			this.currPid = "";
		}
		private double checkMoneyOfBill()
		{
			double num = 0.0;
			for (int i = 0; i < this.objTable.Rows.Count; i++)
			{
				num += double.Parse(this.objTable.Rows[i]["ProductMoney"].ToString().Replace(",", ""));
			}
			return num;
		}
		private void updateObjTable(int index)
		{
			if (this.txtBarcode.Text == "")
			{
				if (float.Parse(this.txtProductNumber.Text) > float.Parse(this.txtBalancer.Text))
				{
					MessageBox.Show("Số lượng xuất kho lớn hơn số lượng hàng còn trong kho", "Cảnh báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
					this.txtProductNumber.Text = this.txtBalancer.Text;
				}
				else
				{
					this.objTable.Rows[index]["Pid"] = this.currPid;
					this.objTable.Rows[index]["ProductName"] = this.txtProductName.Text;
					this.objTable.Rows[index]["ProductUnit"] = this.txtProductUnit.Text;
					this.objTable.Rows[index]["ProductPrice1"] = this.txtProductPrice.Text;
					try
					{
						this.objTable.Rows[index]["ProductNumber"] = float.Parse(this.txtProductNumber.Text.Replace(",", ""));
					}
					catch
					{
						this.objTable.Rows[index]["ProductNumber"] = this.txtProductNumber.Text;
					}
					this.objTable.Rows[index]["ProductMoney"] = (double.Parse(this.objTable.Rows[index]["ProductNumber"].ToString().Replace(",", "")) * double.Parse(this.txtProductPrice.Text.Replace(",", ""))).ToString();
					this.objTable.Rows[index]["Packet"] = this.cbbPacket.Text;
					this.objTable.Rows[index]["ProductDate"] = this.dtpProductDate.Text;
					this.objTable.Rows[index]["ProductExpiryDate"] = this.dptProductExpiryDate.Text;
					this.objTable.Rows[index]["ProductPrice"] = "0";
					this.objTable.Rows[index]["ProductPrice2"] = "0";
					this.objTable.Rows[index]["NationalID"] = this.cbbNational.SelectedValue.ToString();
					this.objTable.Rows[index]["VAT"] = "0";
					this.objTable.Rows[index]["possName"] = this.lblPossName.Text;
					this.objTable.Rows[index]["Rate"] = this.currRate.ToString();
				}
			}
			else
			{
				this.objTable.Rows[index]["ProductPrice1"] = this.txtProductPrice.Text;
				this.objTable.Rows[index]["ProductNumber"] = float.Parse(this.txtProductNumber.Text.Replace(",", "")).ToString();
				if (float.Parse(this.objTable.Rows[index]["ProductNumber"].ToString()) > float.Parse(this.txtBalancer.Text))
				{
					MessageBox.Show("Số lượng xuất kho lớn hơn số lượng hàng còn trong kho", "Cảnh báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
					this.txtProductNumber.Text = this.txtBalancer.Text;
					this.objTable.Rows[index]["ProductNumber"] = this.txtBalancer.Text;
				}
				else
				{
					this.objTable.Rows[index]["ProductMoney"] = float.Parse(this.objTable.Rows[index]["ProductPrice1"].ToString()) * float.Parse(this.objTable.Rows[index]["ProductNumber"].ToString());
					this.objTable.Rows[index]["possName"] = this.lblPossName.Text;
					this.objTable.Rows[index]["Rate"] = this.currRate.ToString();
				}
			}
		}
		private void dgvProduct_CellEnter(object sender, DataGridViewCellEventArgs e)
		{
			try
			{
				if (e.RowIndex != -1 && this.btnSave.Enabled)
				{
					if (this.isPostBack)
					{
						this.currIndex = e.RowIndex;
						this.currPid = this.objTable.Rows[e.RowIndex]["Pid"].ToString();
						this.currVAT = this.objTable.Rows[e.RowIndex]["VAT"].ToString();
						this.txtBalancerAllPacket.Text = this.objProduct.balancerOfAllPack(this.currPid, this.cbbWareHouse.SelectedValue.ToString()).ToString();
						this.currRate = (double)float.Parse(this.objTable.Rows[e.RowIndex]["Rate"].ToString());
						this.txtProductName.Text = this.objTable.Rows[e.RowIndex]["ProductName"].ToString();
						this.txtProductUnit.Text = this.objTable.Rows[e.RowIndex]["ProductUnit"].ToString();
						this.txtProductPrice.Text = this.objTable.Rows[e.RowIndex]["ProductPrice"].ToString();
						this.txtProductNumber.Text = this.objTable.Rows[e.RowIndex]["ProductNumber"].ToString();
						this.txtProductMoney.Text = this.objTable.Rows[e.RowIndex]["ProductMoney"].ToString();
						this.cbbPacket.SelectedValue = this.objTable.Rows[e.RowIndex]["Packet"].ToString();
						this.dtpProductDate.Value = DateTime.Parse(this.objTable.Rows[e.RowIndex]["Column7"].ToString());
						this.dptProductExpiryDate.Value = DateTime.Parse(this.objTable.Rows[e.RowIndex]["Column8"].ToString());
						this.cbbNational.SelectedValue = this.objTable.Rows[e.RowIndex]["NationalID"].ToString();
						this.lblPossName.Text = this.objTable.Rows[e.RowIndex]["possName"].ToString();
						this.txtBalancerAllPacket.Text = this.objProduct.balancerOfAllPack(this.currPid, this.cbbWareHouse.SelectedValue.ToString()).ToString();
						this.btnAddToBill.Enabled = true;
						if (this.BasePrice)
						{
							this.currPrice = this.objProduct.getPriceOutBase(this.currPid, this.cbbPacket.SelectedValue.ToString());
						}
						else
						{
							this.currPrice = double.Parse(this.objProduct.getPriceOutputAVG(this.currPid).ToString());
						}
					}
				}
			}
			catch
			{
			}
		}
		private void txtProductNumber_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == '\r')
			{
				this.btnAddToBill.PerformClick();
			}
		}
		private void btnAdd_Click(object sender, EventArgs e)
		{
			this.objTable = new System.Data.DataTable();
			DataColumn column = new DataColumn("Pid", typeof(string));
			DataColumn column2 = new DataColumn("ProductName", typeof(string));
			DataColumn column3 = new DataColumn("ProductUnit", typeof(string));
			DataColumn column4 = new DataColumn("ProductNumber", typeof(string));
			DataColumn column5 = new DataColumn("ProductPrice", typeof(string));
			DataColumn column6 = new DataColumn("ProductMoney", typeof(string));
			DataColumn column7 = new DataColumn("Packet", typeof(string));
			DataColumn column8 = new DataColumn("ProductDate", typeof(DateTime));
			DataColumn column9 = new DataColumn("ProductExpiryDate", typeof(DateTime));
			DataColumn column10 = new DataColumn("ProductPrice1", typeof(string));
			DataColumn column11 = new DataColumn("ProductPrice2", typeof(string));
			DataColumn column12 = new DataColumn("NationalID", typeof(string));
			DataColumn column13 = new DataColumn("VAT", typeof(string));
			DataColumn column14 = new DataColumn("possName", typeof(string));
			DataColumn column15 = new DataColumn("Rate", typeof(string));
			DataColumn column16 = new DataColumn("IdRegisters", typeof(string));
			DataColumn column17 = new DataColumn("IdControl", typeof(string));
			DataColumn column18 = new DataColumn("IdBisMake", typeof(string));
			DataColumn column19 = new DataColumn("IdBisImport", typeof(string));
			this.objTable.Columns.Add(column);
			this.objTable.Columns.Add(column2);
			this.objTable.Columns.Add(column3);
			this.objTable.Columns.Add(column4);
			this.objTable.Columns.Add(column5);
			this.objTable.Columns.Add(column6);
			this.objTable.Columns.Add(column7);
			this.objTable.Columns.Add(column8);
			this.objTable.Columns.Add(column9);
			this.objTable.Columns.Add(column10);
			this.objTable.Columns.Add(column11);
			this.objTable.Columns.Add(column12);
			this.objTable.Columns.Add(column13);
			this.objTable.Columns.Add(column14);
			this.objTable.Columns.Add(column15);
			this.objTable.Columns.Add(column16);
			this.objTable.Columns.Add(column17);
			this.objTable.Columns.Add(column18);
			this.objTable.Columns.Add(column19);
			this.dgvProduct.AutoGenerateColumns = false;
			this.dgvProduct.DataSource = this.objTable;
			this.btnSave.Enabled = true;
			this.btnEdit.Enabled = false;
			this.btnPrint.Enabled = false;
			this.btnDel.Enabled = false;
			this.btnSelect.Enabled = true;
			this.btnAddToBill.Enabled = true;
			this.txtProductPrice.ReadOnly = false;
			this.txtProductNumber.ReadOnly = false;
			this.cbbPacket.Enabled = true;
			this.txtBarcode.ReadOnly = false;
			this.txtDiscountOut.ReadOnly = false;
			this.resetAllControl();
			this.cbbProvider.Focus();
		}
		private void resetAllControl()
		{
			try
			{
				this.cbbProvider.Enabled = true;
				this.cbbWareHouse.Enabled = true;
				this.txtDate.Enabled = true;
				this.txtID.Enabled = true;
				this.txtID.Text = "";
				this.txtDate.Value = DateTime.Now;
				this.txtTotalMoney.Text = "0";
				this.txtNote.Text = "";
				this.cbbProvider.SelectedIndex = 0;
				this.txtDiscountOut.Text = "0";
				this.txtDebt.Text = "0";
				this.txtProductNumber.Text = "";
				this.txtProductName.Text = "";
				this.txtProductUnit.Text = "";
				this.txtProductPrice.Text = "";
				this.txtProductMoney.Text = "";
				this.currPid = "";
			}
			catch
			{
			}
		}
		private void btnSave_Click(object sender, EventArgs e)
		{
			if (this.dgvProduct.Rows.Count == 0)
			{
				MessageBox.Show("Nhập thông tin chi tiết về đơn hàng trước khi lưu", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
			}
			else
			{
				if (this.cbbProvider.Items.Count == 0)
				{
					MessageBox.Show("Chọn khách hàng trước khi xuất hàng từ kho", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
				}
				else
				{
					if (!this.objPartner.allowOutProduct(this.cbbProvider.SelectedValue.ToString()))
					{
						MessageBox.Show("Hệ thống không cho phép xuất hàng cho khách hàng\r\n\r\n" + this.cbbProvider.Text, "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
					}
					else
					{
						double warningDebt = this.objFunc.getWarningDebt();
						if (warningDebt != -1.0 && warningDebt < double.Parse(this.txtDebt.Text))
						{
							MessageBox.Show(string.Concat(new string[]
							{
								"Công nợ của khách hàng \"",
								this.cbbProvider.Text,
								"\" lớn hơn mức công nợ\r\n\r\n tối đa cho phép [ ",
								string.Format("{0,0:0}", warningDebt),
								" ]. Việc xuất hàng không thể tiếp tục !"
							}), "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
						}
						else
						{
							if (this.cbbWareHouse.SelectedValue.ToString() == this.cbbWareHouseTerget.SelectedValue.ToString())
							{
								MessageBox.Show("Kho nhận phải khác với kho xuất", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
							}
							else
							{
								if (this.txtID.Text == "")
								{
									if (this.txtID.Text == "")
									{
										string text = this.objBill.getOutBillID();
										try
										{
											text = this.perfixOut + (int.Parse(text.Replace(this.perfixOut, "")) + 1).ToString();
										}
										catch
										{
											text = this.perfixOut + "1";
										}
										this.txtID.Text = text;
									}
								}
								if (!this.btnEdit.Enabled)
								{
									if (this.objBill.checkID(this.txtID.Text))
									{
										MessageBox.Show("Hoá đơn có số hiệu \"" + this.txtID.Text + "\" đã tồn tại!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
										this.txtID.Focus();
										return;
									}
								}
								if (this.objBill.actionForward(this.txtID.Text, this.txtDate.Value, float.Parse(this.txtMoney.Text), "OUT3", this.cbbWareHouse.SelectedValue.ToString(), this.txtNote.Text, this.cbbProvider.SelectedValue.ToString(), this.objTable, "OUT", this.userName, this.fullName, float.Parse(this.txtDiscountOut.Text), float.Parse(this.txtTotalMoney.Text), this.cbbWareHouseTerget.SelectedValue.ToString()) == 1)
								{
									MessageBox.Show("Có lỗi xảy ra trong quá trình lưu hoá đơn", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
									this.txtID.Focus();
								}
								else
								{
									this.getBill("");
									this.btnEdit.Enabled = true;
									this.btnPrint.Enabled = true;
									this.btnDel.Enabled = true;
									this.btnSave.Enabled = false;
									this.btnAdd.PerformClick();
								}
							}
						}
					}
				}
			}
		}
		private void getBill(string sql_Search)
		{
			this.resetAllControl();
			this.dgvBill.AutoGenerateColumns = false;
			this.dgvProduct.DataSource = null;
			this.dgvProduct.AutoGenerateColumns = false;
			SqlConnection sqlConnection = new SqlConnection(this.objFunc.strConnectionString);
			string cmdText;
			if (sql_Search == "")
			{
				cmdText = "SELECT * FROM [TabBill] WHERE TypeInput IN ('OUT1','OUT2','OUT3') AND CreateDate BETWEEN @ObjDate1 AND @objDate2 AND [ActType] = 1 ORDER BY [CreateDate] DESC";
			}
			else
			{
				cmdText = sql_Search + " AND [TabBill].[CreateDate] BETWEEN @ObjDate1 AND @objDate2 AND [ActType] = 1 ORDER BY [TabBill].[CreateDate] DESC";
			}
			SqlCommand sqlCommand = new SqlCommand(cmdText, sqlConnection);
			SqlParameter sqlParameter = new SqlParameter("ObjDate1", SqlDbType.DateTime);
			SqlParameter sqlParameter2 = new SqlParameter("ObjDate2", SqlDbType.DateTime);
			sqlParameter.Value = DateTime.Parse(this.dtpFrom.Value.ToString().Substring(0, 10) + " 00:00:00 AM");
			sqlParameter2.Value = DateTime.Parse(this.dtpTo.Value.ToString().Substring(0, 10) + " 11:59:59 PM");
			sqlCommand.Parameters.Add(sqlParameter);
			sqlCommand.Parameters.Add(sqlParameter2);
			SqlDataAdapter sqlDataAdapter = new SqlDataAdapter(sqlCommand);
			DataSet dataSet = new DataSet();
			sqlConnection.Open();
			sqlDataAdapter.Fill(dataSet);
			this.objTableBill = dataSet.Tables[0];
			this.dgvBill.DataSource = this.objTableBill;
			sqlConnection.Close();
			sqlConnection.Dispose();
			sqlDataAdapter.Dispose();
			dataSet.Dispose();
		}
		private void dgvBill_CellEnter(object sender, DataGridViewCellEventArgs e)
		{
			this.txtID.Text = this.objTableBill.Rows[e.RowIndex]["ID"].ToString();
			this.txtDate.Value = DateTime.Parse(this.objTableBill.Rows[e.RowIndex]["CreateDate"].ToString());
			this.txtMoney.Text = string.Format(Program.lenAffterDecimal, double.Parse(this.objTableBill.Rows[e.RowIndex]["TotalMoney"].ToString()));
			this.cbbProvider.SelectedValue = this.objTableBill.Rows[e.RowIndex]["PID"].ToString();
			this.txtNote.Text = this.objTableBill.Rows[e.RowIndex]["Note"].ToString();
			this.txtDiscountOut.Text = this.objTableBill.Rows[e.RowIndex]["Discount"].ToString();
			this.cbbWareHouse.SelectedValue = this.objTableBill.Rows[e.RowIndex]["WID"].ToString();
			this.dgvProduct.AutoGenerateColumns = false;
			this.objTable = new System.Data.DataTable();
			this.objTable = this.objBill.getDetailBill(this.txtID.Text);
			this.dgvProduct.DataSource = this.objTable;
			this.getObjectInfo();
			this.txtDiscountOut.Text = this.objTableBill.Rows[e.RowIndex]["Discount"].ToString();
			this.cbbProvider.Enabled = false;
			this.cbbWareHouse.Enabled = false;
			this.txtDate.Enabled = false;
			this.txtID.Enabled = false;
			this.txtID.ReadOnly = true;
			this.btnEdit.Enabled = true;
			this.btnSelect.Enabled = false;
			this.btnAddToBill.Enabled = false;
			this.txtProductNumber.ReadOnly = true;
			this.cbbPacket.Enabled = false;
			this.btnSave.Enabled = false;
			this.btnPrint.Enabled = true;
			this.btnDel.Enabled = false;
			this.txtBarcode.ReadOnly = true;
			this.txtProductPrice.ReadOnly = true;
			this.resetControl();
		}
		private void btnEdit_Click(object sender, EventArgs e)
		{
			if (this.userName.ToUpper() == "ADMIN" || !this.noAllowOtherEditBill || (this.noAllowOtherEditBill && this.objBill.getuserNameBillID(this.txtID.Text) == this.userName))
			{
				bool noEditAffterPrint = this.objFunc.getNoEditAffterPrint();
				if (!noEditAffterPrint || (noEditAffterPrint && !this.objBill.getPrinted(this.txtID.Text)))
				{
					this.btnSave.Enabled = true;
					this.btnDel.Enabled = true;
					this.btnPrint.Enabled = true;
					this.btnSelect.Enabled = true;
					this.setStatusBtnAddToBill();
					this.txtProductNumber.ReadOnly = false;
					this.txtBarcode.ReadOnly = false;
					this.cbbPacket.Enabled = true;
					this.txtProductPrice.ReadOnly = false;
					this.txtDiscountOut.ReadOnly = false;
					this.cbbProvider.Enabled = true;
					this.cbbWareHouse.Enabled = true;
					this.cbbWareHouseTerget.Enabled = true;
				}
				else
				{
					MessageBox.Show("Hoá đơn này đã được in. Bạn không thể sửa đổi !", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
				}
			}
			else
			{
				MessageBox.Show("Chỉ có người tạo ra hoá đơn mới có quyền sửa đổi", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
			}
		}
		private void cbbProvider_SelectedIndexChanged(object sender, EventArgs e)
		{
			this.getObjectInfo();
		}
		private void getObjectInfo()
		{
			if (this.isPostBack)
			{
				try
				{
					double num = this.objPartner.getFistBalanceCustomer(this.cbbProvider.SelectedValue.ToString()) + this.objPartner.getTotalMoney(this.cbbProvider.SelectedValue.ToString(), this.txtDate.Value) - this.objPartner.getTotalMoneyPayedCustomer(this.cbbProvider.SelectedValue.ToString(), this.txtDate.Value);
					this.txtDiscountOut.Text = this.objPartner.getDiscountCustomer(this.cbbProvider.SelectedValue.ToString()).ToString();
					this.txtDebt.Text = num.ToString();
					this.cusAddress = this.objPartner.getAddress1(this.cbbProvider.SelectedValue.ToString());
					this.cusPhone = this.objPartner.getPhone1(this.cbbProvider.SelectedValue.ToString());
				}
				catch
				{
				}
			}
		}
		private void dtpSelectMonth_ValueChanged(object sender, EventArgs e)
		{
			this.getBill("");
		}
		private void dgvProduct_KeyPress(object sender, KeyPressEventArgs e)
		{
			MessageBox.Show(e.KeyChar.ToString());
		}
		private void dgvProduct_KeyDown(object sender, KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Delete && this.btnSave.Enabled)
			{
				this.objTable.Rows[this.currIndex].Delete();
				this.dgvProduct.Refresh();
				this.txtMoney.Text = string.Format(Program.lenAffterDecimal, this.checkMoneyOfBill());
			}
		}
		private void cmsDelProduct_Click(object sender, EventArgs e)
		{
			try
			{
				if (this.btnSave.Enabled)
				{
					this.objTable.Rows[this.currIndex].Delete();
					this.dgvProduct.Refresh();
					this.txtMoney.Text = string.Format(Program.lenAffterDecimal, this.checkMoneyOfBill());
				}
			}
			catch
			{
			}
		}
		private void txtProductUnit_TextChanged(object sender, EventArgs e)
		{
			this.setStatusBtnAddToBill();
		}
		private void txtProductPrice_TextChanged(object sender, EventArgs e)
		{
			this.setStatusBtnAddToBill();
		}
		private void txtProductMoney_TextChanged(object sender, EventArgs e)
		{
			this.setStatusBtnAddToBill();
		}
		private void btnDel_Click(object sender, EventArgs e)
		{
			if (MessageBox.Show("Bạn có chắc chắn muốn xoá hoá đơn [ " + this.txtID.Text.ToUpper() + " ] không?", "Thông báo", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
			{
				this.objBill.delItem(this.txtID.Text);
				this.getBill("");
				this.btnAdd.PerformClick();
			}
		}
		private void btnPrint_Click(object sender, EventArgs e)
		{
			frmOutputForwardBill.objTable = new System.Data.DataTable();
			frmOutputForwardView frmOutputForwardView = new frmOutputForwardView();
			frmOutputForwardView.billID = this.txtID.Text;
			frmOutputForwardView.billDate = this.txtDate.Text;
			frmOutputForwardView.billNote = this.txtNote.Text;
			frmOutputForwardView.billTotalMoney = this.txtTotalMoney.Text;
			frmOutputForwardView.cusName = this.cbbProvider.Text;
			frmOutputForwardView.cusAddress = this.cusAddress;
			frmOutputForwardView.cusPhone = this.cusPhone;
			frmOutputForwardView.Debt = this.txtDebt.Text;
			frmOutputForwardView.ALl = (double.Parse(this.txtTotalMoney.Text) + double.Parse(this.txtDebt.Text)).ToString();
			frmOutputForwardBill.objTable = this.objTable;
			frmOutputForwardBill.Discount = "";
			frmOutputForwardBill.Discount = this.txtMoneyAfterDiscount.Text;
			frmOutputForwardView.ShowDialog();
			try
			{
				this.dgvProduct.Columns["TT"].Visible = false;
			}
			catch
			{
			}
			this.objBill.setPrinted(this.txtID.Text);
		}
		private void cbbPacket_SelectedIndexChanged(object sender, EventArgs e)
		{
			try
			{
				if (this.BasePrice)
				{
					this.txtProductPrice.Text = this.objProduct.getPriceOutBase(this.currPid, this.cbbPacket.SelectedValue.ToString()).ToString();
				}
				else
				{
					this.txtProductPrice.Text = this.objProduct.getPriceOutputAVG(this.currPid).ToString();
				}
				this.txtBalancer.Text = this.objProduct.balancerOfPack(this.currPid, this.cbbPacket.SelectedValue.ToString(), this.cbbWareHouse.SelectedValue.ToString()).ToString();
				this.cbbNational.SelectedValue = this.objProduct.getNationalID(this.currPid, this.cbbPacket.SelectedValue.ToString()).ToString();
			}
			catch
			{
			}
		}
		private void txtBarcode_TextChanged(object sender, EventArgs e)
		{
		}
		private void txtTotalMoney_TextChanged(object sender, EventArgs e)
		{
			try
			{
				this.txtTotalMoney.Text = string.Format(Program.lenAffterDecimal, double.Parse(this.txtTotalMoney.Text));
			}
			catch
			{
				this.txtTotalMoney.Text = "0";
			}
			try
			{
				double num = double.Parse(this.txtTotalMoney.Text) - double.Parse(this.txtTotalMoney.Text) * double.Parse(this.txtDiscountOut.Text) / 100.0;
				this.txtMoneyAfterDiscount.Text = string.Format(Program.lenAffterDecimal, num);
			}
			catch
			{
				this.txtMoneyAfterDiscount.Text = "0";
			}
		}
		private void txtDiscountIn_TextChanged(object sender, EventArgs e)
		{
			try
			{
				double num = double.Parse(this.txtMoney.Text) * double.Parse(this.txtDiscountOut.Text) / 100.0;
				this.txtMoneyAfterDiscount.Text = string.Format(Program.lenAffterDecimal, num);
			}
			catch
			{
				this.txtMoneyAfterDiscount.Text = "0";
			}
			try
			{
				double num = double.Parse(this.txtMoney.Text) - double.Parse(this.txtMoney.Text) * double.Parse(this.txtDiscountOut.Text) / 100.0;
				this.txtTotalMoney.Text = string.Format(Program.lenAffterDecimal, num);
			}
			catch
			{
				this.txtTotalMoney.Text = "0";
			}
		}
		private void btnSearch_Click(object sender, EventArgs e)
		{
			frmSearchBill frmSearchBill = new frmSearchBill();
			frmSearchBill.type_Input = "OUT";
			frmSearchBill.ShowDialog();
			if (frmSearchBill.sql_Search.Trim() != "")
			{
				this.getBill(frmSearchBill.sql_Search);
			}
		}
		private void btnViewAll_Click(object sender, EventArgs e)
		{
			this.getBill("");
		}
		private void txtDebt_TextChanged(object sender, EventArgs e)
		{
			try
			{
				this.txtDebt.Text = string.Format(Program.lenAffterDecimal, double.Parse(this.txtDebt.Text));
			}
			catch
			{
				this.txtDebt.Text = "0";
			}
		}
		private void txtTotalMoney_Leave(object sender, EventArgs e)
		{
			this.txtTotalMoney.BackColor = Color.White;
			this.objFunc.txtObject_Leave(sender);
		}
		private void txtProductPrice_Leave(object sender, EventArgs e)
		{
			this.txtProductPrice.BackColor = Color.White;
			this.objFunc.txtObject_Leave(sender);
		}
		private void txtProductNumber_Leave(object sender, EventArgs e)
		{
			this.txtProductNumber.BackColor = Color.White;
			this.objFunc.txtObject_Leave(sender);
		}
		private void txtProductMoney_Leave(object sender, EventArgs e)
		{
			this.objFunc.txtObject_Leave(sender);
		}
		private void txtBalancer_Leave(object sender, EventArgs e)
		{
			this.objFunc.txtObject_Leave(sender);
		}
		private void btnListUnit_Click(object sender, EventArgs e)
		{
			if (this.currPid != "")
			{
				frmSelectProductUnit frmSelectProductUnit = new frmSelectProductUnit();
				frmSelectProductUnit.Pid = int.Parse(this.currPid);
				frmSelectProductUnit.ShowDialog();
				this.txtProductUnit.Text = frmSelectProductUnit.unitName;
				this.currRate = (double)float.Parse(frmSelectProductUnit.unitNumber);
				this.txtProductPrice.Text = (this.currPrice / (double)float.Parse(frmSelectProductUnit.unitNumber)).ToString();
			}
		}
		private void txtBarcode_KeyDown(object sender, KeyEventArgs e)
		{
			if (!(this.txtBarcode.Text.Trim() == ""))
			{
				if (e.KeyCode == Keys.Return)
				{
					this.resetControl();
					this.txtProductName.Focus();
					this.objProduct.getInformationFromBarcodeForWard(this.txtBarcode.Text, ref this.currPid, this.txtProductName, this.txtProductUnit, this.txtProductPrice, this.txtProductPrice1, this.txtProductPrice2, this.cbbNational, this.txtProductNumber, this.txtBalancer, this.cbbWareHouse.SelectedValue.ToString(), this.BasePrice);
					if (!this.AllowSellSuppen)
					{
						if (this.objProduct.checkForSuppend(this.currPid, this.cbbPacket.SelectedValue.ToString()))
						{
							MessageBox.Show("Bạn đang chọn mặt thuốc\r\n\r\n" + this.txtProductName + "\r\n\r\nThuộc danh mục thuốc cấm lưu hành nên không thể xuất kho", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
							return;
						}
					}
					this.txtBalancerAllPacket.Text = this.objProduct.balancerOfAllPack(this.currPid, this.cbbWareHouse.SelectedValue.ToString()).ToString();
					try
					{
						this.currPrice = (double)float.Parse(this.txtProductPrice.Text);
					}
					catch
					{
						this.currPrice = 0.0;
					}
					this.btnAddToBill.PerformClick();
				}
			}
		}
		private void cmsAddBill_Click(object sender, EventArgs e)
		{
			this.btnAdd.PerformClick();
		}
		private void cmsEditBill_Click(object sender, EventArgs e)
		{
			this.btnEdit.PerformClick();
		}
		private void cmsSaveBill_Click(object sender, EventArgs e)
		{
			this.btnSave.PerformClick();
		}
		private void cmsPrintBill_Click(object sender, EventArgs e)
		{
			this.btnPrint.PerformClick();
		}
		private void cmsDellBill_Click(object sender, EventArgs e)
		{
			this.btnDel.PerformClick();
		}
		private void cmsSearchBill_Click(object sender, EventArgs e)
		{
			this.btnSearch.PerformClick();
		}
		private void btnSave_EnabledChanged(object sender, EventArgs e)
		{
			this.cmsSaveBill.Enabled = this.btnSave.Enabled;
		}
		private void btnDel_EnabledChanged(object sender, EventArgs e)
		{
			this.cmsDellBill.Enabled = this.btnDel.Enabled;
		}
		private void btnPrint_EnabledChanged(object sender, EventArgs e)
		{
			this.cmsPrintBill.Enabled = this.btnPrint.Enabled;
		}
		private void txtProductName_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == '\r')
			{
				if (this.txtProductName.Text.Trim() != "")
				{
					this.cbbPacket.Focus();
				}
				else
				{
					this.btnSelect.PerformClick();
				}
			}
		}
		private void txtProductUnit_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == '\r')
			{
				this.txtProductPrice.Focus();
			}
		}
		private void cbbPacket_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == '\r')
			{
				this.txtProductUnit.Focus();
			}
		}
		private void txtProductPrice_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == '\r')
			{
				this.txtProductNumber.Focus();
			}
		}
		private void txtID_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == '\r')
			{
				this.cbbProvider.Focus();
			}
		}
		private void txtTotalMoney_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == '\r')
			{
			}
		}
		private void cbbTypeOutput_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == '\r')
			{
				this.txtProductName.Focus();
			}
		}
		private void txtDate_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == '\r')
			{
				this.txtDiscountOut.Focus();
			}
		}
		private void txtDiscountOut_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == '\r')
			{
				this.btnSave.PerformClick();
			}
		}
		private void txtMoneyAfterDiscount_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == '\r')
			{
				this.cbbProvider.Focus();
			}
		}
		private void cbbProvider_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == '\r')
			{
				this.cbbWareHouse.Focus();
			}
		}
		private void txtNote_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == '\r')
			{
				this.txtDiscountOut.Focus();
			}
		}
		private void txtDebt_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == '\r')
			{
				this.txtProductName.Focus();
			}
		}
		private void txtProductName_KeyDown(object sender, KeyEventArgs e)
		{
			if (e.KeyData == Keys.Down)
			{
				if (this.txtProductName.Text.Trim() != "")
				{
					this.btnSelect.PerformClick();
				}
			}
			else
			{
				if (e.KeyData == Keys.Return)
				{
					if (this.txtProductName.Text.Trim() == "")
					{
						this.btnSelect.PerformClick();
					}
					else
					{
						this.cbbPacket.Focus();
					}
				}
			}
		}
		private void btnAddCustomer_Click(object sender, EventArgs e)
		{
			new FrmupdtCustomer
			{
				FormBorderStyle = FormBorderStyle.FixedToolWindow
			}.ShowDialog();
			this.objFunc.LoadComboBox("SELECT [CusID] , UPPER(Name) AS Name FROM [TabPartner] WHERE [IsCustomer] = 1", this.cbbProvider, "CusID", "Name");
		}
		private void txtProductName_Enter(object sender, EventArgs e)
		{
			this.txtProductName.BackColor = Color.Aqua;
		}
		private void txtProductName_Leave(object sender, EventArgs e)
		{
			this.txtProductName.BackColor = Color.White;
		}
		private void txtProductUnit_Enter(object sender, EventArgs e)
		{
			this.txtProductUnit.BackColor = Color.Aqua;
		}
		private void txtProductUnit_Leave(object sender, EventArgs e)
		{
			this.txtProductUnit.BackColor = Color.White;
		}
		private void txtProductPrice_Enter(object sender, EventArgs e)
		{
			this.txtProductPrice.BackColor = Color.Aqua;
		}
		private void txtProductNumber_Enter(object sender, EventArgs e)
		{
			this.txtProductNumber.BackColor = Color.Aqua;
		}
		private void txtID_Enter(object sender, EventArgs e)
		{
			this.txtID.BackColor = Color.Aqua;
		}
		private void txtID_Leave(object sender, EventArgs e)
		{
			this.txtID.BackColor = Color.White;
		}
		private void txtTotalMoney_Enter(object sender, EventArgs e)
		{
			this.txtTotalMoney.BackColor = Color.Aqua;
		}
		private void txtDiscountOut_Enter(object sender, EventArgs e)
		{
			this.txtDiscountOut.BackColor = Color.Aqua;
		}
		private void txtDiscountOut_Leave(object sender, EventArgs e)
		{
			this.txtDiscountOut.BackColor = Color.White;
		}
		private void txtMoneyAfterDiscount_Enter(object sender, EventArgs e)
		{
			this.txtMoneyAfterDiscount.BackColor = Color.Aqua;
		}
		private void txtMoneyAfterDiscount_Leave(object sender, EventArgs e)
		{
			this.txtMoneyAfterDiscount.BackColor = Color.White;
			try
			{
				double num = double.Parse(this.txtMoneyAfterDiscount.Text) * 100.0 / double.Parse(this.txtMoney.Text);
				this.txtDiscountOut.Text = num.ToString();
			}
			catch
			{
				this.txtDiscountOut.Text = "0";
			}
		}
		private void txtNote_Enter(object sender, EventArgs e)
		{
			this.txtNote.BackColor = Color.Aqua;
		}
		private void txtNote_Leave(object sender, EventArgs e)
		{
			this.txtNote.BackColor = Color.White;
		}
		private void txtDebt_Enter(object sender, EventArgs e)
		{
			this.txtDebt.BackColor = Color.Aqua;
		}
		private void txtDebt_Leave(object sender, EventArgs e)
		{
			this.txtDebt.BackColor = Color.White;
		}
		private void frmOutput_FormClosing(object sender, FormClosingEventArgs e)
		{
			if (this.btnSave.Enabled)
			{
				if (MessageBox.Show("Bạn có muốn ghi lại thông tin về hoá đơn hiện tại không?", "Thông báo", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
				{
					e.Cancel = true;
					this.btnSave.PerformClick();
				}
			}
		}
		private void frmOutput_Shown(object sender, EventArgs e)
		{
			this.isPostBack = true;
			this.btnAdd.PerformClick();
		}
		private void btnSearchTime_Click(object sender, EventArgs e)
		{
			this.getBill("");
		}
		private void txtMoney_TextChanged(object sender, EventArgs e)
		{
			try
			{
				double num = double.Parse(this.txtMoney.Text) * double.Parse(this.txtDiscountOut.Text) / 100.0;
				this.txtMoneyAfterDiscount.Text = string.Format(Program.lenAffterDecimal, num);
			}
			catch
			{
				this.txtMoneyAfterDiscount.Text = "0";
			}
			try
			{
				double num = double.Parse(this.txtMoney.Text) - double.Parse(this.txtMoney.Text) * double.Parse(this.txtDiscountOut.Text) / 100.0;
				this.txtTotalMoney.Text = string.Format(Program.lenAffterDecimal, num);
			}
			catch
			{
				this.txtTotalMoney.Text = "0";
			}
		}
		private void btnExport_Click(object sender, EventArgs e)
		{
			try
			{
				if (this.exportDataToExcel("", this.objTable))
				{
					MessageBox.Show("Hoá đơn xuất kho đã được ghi ra file", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
				}
			}
			catch
			{
			}
		}
		public bool exportDataToExcel(string tieude, System.Data.DataTable dt)
		{
			bool result = false;
			object value = Missing.Value;
			ApplicationClass applicationClass = new ApplicationClass();
			Workbook workbook = applicationClass.Workbooks.Add(value);
			Worksheet worksheet = (Worksheet)workbook.Worksheets.get_Item(1);
			applicationClass.Visible = false;
			int count = dt.Columns.Count;
			int count2 = dt.Rows.Count;
			SaveFileDialog saveFileDialog = new SaveFileDialog();
			saveFileDialog.Filter = "Excel file (*.xls)|*.xls";
			saveFileDialog.FileName = this.txtID.Text;
			if (saveFileDialog.ShowDialog() == DialogResult.OK)
			{
				for (int i = 0; i < count; i++)
				{
					worksheet.Cells[2, i + 2] = dt.Columns[i].ColumnName;
				}
				worksheet.Cells[2, 1] = "STT";
				for (int i = 0; i < count2; i++)
				{
					worksheet.Cells[i + 3, 1] = i + 1;
				}
				for (int i = 0; i < count2; i++)
				{
					for (int j = 0; j < count; j++)
					{
						worksheet.Cells[i + 3, j + 2] = dt.Rows[i][j].ToString().Replace(",", "");
					}
				}
				for (int i = 0; i < count2; i++)
				{
					((Range)worksheet.Cells[1, i + 1]).EntireColumn.AutoFit();
				}
				workbook.SaveAs(saveFileDialog.FileName, XlFileFormat.xlWorkbookNormal, value, value, value, value, XlSaveAsAccessMode.xlExclusive, value, value, value, value, value);
				workbook.Close(true, value, value);
				applicationClass.Quit();
				this.releaseObject(worksheet);
				this.releaseObject(workbook);
				this.releaseObject(applicationClass);
				result = true;
			}
			return result;
		}
		public void releaseObject(object obj)
		{
			try
			{
				Marshal.ReleaseComObject(obj);
				obj = null;
			}
			catch (Exception ex)
			{
				obj = null;
				throw new Exception("Exception Occured while releasing object " + ex.ToString());
			}
			finally
			{
				GC.Collect();
			}
		}
		public bool exportReport(int type, ReportDocument repd)
		{
			SaveFileDialog saveFileDialog = new SaveFileDialog();
			bool result = false;
			switch (type)
			{
			case 1:
				saveFileDialog.Filter = "Word file(*.doc)|*.doc";
				if (saveFileDialog.ShowDialog() == DialogResult.OK)
				{
					repd.ExportToDisk(ExportFormatType.WordForWindows, saveFileDialog.FileName);
					result = true;
				}
				break;
			case 2:
				saveFileDialog.Filter = "Pdf file(*.pdf)|*.pdf";
				if (saveFileDialog.ShowDialog() == DialogResult.OK)
				{
					repd.ExportToDisk(ExportFormatType.PortableDocFormat, saveFileDialog.FileName);
					result = true;
				}
				break;
			case 3:
				saveFileDialog.Filter = "Excel file(*.xls)|*.xls";
				if (saveFileDialog.ShowDialog() == DialogResult.OK)
				{
					repd.ExportToDisk(ExportFormatType.Excel, saveFileDialog.FileName);
					result = true;
				}
				break;
			default:
				MessageBox.Show("Khong chon dung loai ");
				break;
			}
			return result;
		}
		private void txtID_TextChanged(object sender, EventArgs e)
		{
			if (this.txtID.Text.Trim() != "")
			{
				this.btnExport.Enabled = true;
			}
			else
			{
				this.btnExport.Enabled = false;
			}
		}
		private void ctmJustBillAdd_Click(object sender, EventArgs e)
		{
			this.btnAdd.PerformClick();
		}
		private void ctmJustBillEdit_Click(object sender, EventArgs e)
		{
			this.btnEdit.PerformClick();
		}
		private void ctmJustBillPrint_Click(object sender, EventArgs e)
		{
			this.btnPrint.PerformClick();
		}
		private void ctmJustBillDel_Click(object sender, EventArgs e)
		{
			this.btnDel.PerformClick();
		}
		private void ctmJustBillSearch_Click(object sender, EventArgs e)
		{
			this.btnSearch.PerformClick();
		}
		private void label28_DoubleClick(object sender, EventArgs e)
		{
			if (this.dgvBill.RowCount > 0)
			{
				frmSlideShow frmSlideShow = new frmSlideShow();
				frmSlideShow.ShowDialog();
				if (frmSlideShow.OKSelect && frmSlideShow.nmUSecond.Value > 0m)
				{
					this.updateDataWithSlideShow = frmSlideShow.ckbSaveData.Checked;
					if (frmSlideShow.rdbUp.Checked)
					{
						this.Direction = 1;
						this.slideShowIndex = -1;
					}
					else
					{
						this.Direction = -1;
						this.slideShowIndex = this.dgvBill.RowCount;
					}
					this.timer1.Interval = (int)frmSlideShow.nmUSecond.Value * 1000;
					this.timer1.Enabled = true;
					this.timer1.Start();
					this.btnStopSlide.Visible = true;
				}
			}
		}
		private void btnStopSlide_Click(object sender, EventArgs e)
		{
			this.timer1.Stop();
			this.btnStopSlide.Visible = false;
		}
		public void SetFocusDatagridview(DataGridView dgv, int CellPosition)
		{
			try
			{
				dgv.FirstDisplayedScrollingRowIndex = CellPosition;
				dgv.Rows[CellPosition].Selected = true;
				dgv.CurrentCell = dgv.Rows[CellPosition].Cells[0];
				dgv.BeginEdit(false);
			}
			catch
			{
				this.timer2.Stop();
				this.timer1.Stop();
				this.btnStopSlide.Visible = false;
				this.btnEdit.Enabled = true;
				this.btnSave.Enabled = false;
			}
		}
		private void timer1_Tick(object sender, EventArgs e)
		{
			if (this.Direction > 0 && this.slideShowIndex < this.dgvBill.RowCount - 1)
			{
				this.slideShowIndex += this.Direction;
			}
			else
			{
				if (this.Direction >= 0 || this.slideShowIndex <= 0)
				{
					this.timer2.Stop();
					this.timer1.Stop();
					this.btnStopSlide.Visible = false;
					this.btnEdit.Enabled = true;
					this.btnSave.Enabled = false;
					return;
				}
				this.slideShowIndex += this.Direction;
			}
			this.btnStopSlide.Text = (this.slideShowIndex + 1).ToString() + " / " + this.dgvBill.RowCount.ToString() + "  Dừng xem";
			this.SetFocusDatagridview(this.dgvBill, this.slideShowIndex);
			if (this.updateDataWithSlideShow)
			{
				this.saveIntervalCondition = 0;
				this.saveInterval = this.timer1.Interval / 1000 - 1;
				this.btnEdit.PerformClick();
				this.timer2.Enabled = true;
				this.timer2.Start();
			}
		}
		private void timer2_Tick(object sender, EventArgs e)
		{
			this.saveIntervalCondition++;
			if (this.saveIntervalCondition == this.saveInterval)
			{
				this.btnSave.PerformClick();
			}
		}
		protected override void Dispose(bool disposing)
		{
			if (disposing && this.components != null)
			{
				this.components.Dispose();
			}
			base.Dispose(disposing);
		}
		private void InitializeComponent()
		{
			this.components = new Container();
			ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(frmStockForward));
			DataGridViewCellStyle dataGridViewCellStyle = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle2 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle3 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle4 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle5 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle6 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle7 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle8 = new DataGridViewCellStyle();
			this.groupBox1 = new System.Windows.Forms.GroupBox();
			this.label4 = new System.Windows.Forms.Label();
			this.cbbWareHouseTerget = new ComboBox();
			this.label23 = new System.Windows.Forms.Label();
			this.cbbWareHouse = new ComboBox();
			this.btnAddCustomer = new System.Windows.Forms.Button();
			this.txtDebt = new System.Windows.Forms.TextBox();
			this.label6 = new System.Windows.Forms.Label();
			this.cbbProvider = new ComboBox();
			this.label5 = new System.Windows.Forms.Label();
			this.label2 = new System.Windows.Forms.Label();
			this.txtDate = new DateTimePicker();
			this.txtID = new System.Windows.Forms.TextBox();
			this.label1 = new System.Windows.Forms.Label();
			this.txtMoneyAfterDiscount = new System.Windows.Forms.TextBox();
			this.txtDiscountOut = new System.Windows.Forms.TextBox();
			this.label22 = new System.Windows.Forms.Label();
			this.txtNote = new System.Windows.Forms.TextBox();
			this.txtTotalMoney = new System.Windows.Forms.TextBox();
			this.label7 = new System.Windows.Forms.Label();
			this.dgvProduct = new DataGridView();
			this.Column2 = new DataGridViewTextBoxColumn();
			this.Column1 = new DataGridViewTextBoxColumn();
			this.Column3 = new DataGridViewTextBoxColumn();
			this.Column5 = new DataGridViewTextBoxColumn();
			this.Column4 = new DataGridViewTextBoxColumn();
			this.Column6 = new DataGridViewTextBoxColumn();
			this.Column7 = new DataGridViewTextBoxColumn();
			this.Column8 = new DataGridViewTextBoxColumn();
			this.Column9 = new DataGridViewTextBoxColumn();
			this.Column15 = new DataGridViewTextBoxColumn();
			this.Column16 = new DataGridViewTextBoxColumn();
			this.Column17 = new DataGridViewTextBoxColumn();
			this.VAT = new DataGridViewTextBoxColumn();
			this.possName = new DataGridViewTextBoxColumn();
			this.cmsBill = new ContextMenuStrip(this.components);
			this.cmsAddProduct = new ToolStripMenuItem();
			this.toolStripSeparator4 = new ToolStripSeparator();
			this.cmsDelProduct = new ToolStripMenuItem();
			this.toolStripSeparator1 = new ToolStripSeparator();
			this.cmsAddBill = new ToolStripMenuItem();
			this.cmsEditBill = new ToolStripMenuItem();
			this.toolStripSeparator2 = new ToolStripSeparator();
			this.cmsSaveBill = new ToolStripMenuItem();
			this.cmsPrintBill = new ToolStripMenuItem();
			this.cmsDellBill = new ToolStripMenuItem();
			this.toolStripSeparator3 = new ToolStripSeparator();
			this.cmsSearchBill = new ToolStripMenuItem();
			this.btnListUnit = new System.Windows.Forms.Button();
			this.lblPossName = new System.Windows.Forms.Label();
			this.label3 = new System.Windows.Forms.Label();
			this.txtBarcode = new System.Windows.Forms.TextBox();
			this.btnSelect = new System.Windows.Forms.Button();
			this.cbbPacket = new ComboBox();
			this.txtProductPrice = new System.Windows.Forms.TextBox();
			this.txtProductNumber = new System.Windows.Forms.TextBox();
			this.txtProductUnit = new System.Windows.Forms.TextBox();
			this.txtProductName = new System.Windows.Forms.TextBox();
			this.txtBalancer = new System.Windows.Forms.TextBox();
			this.label21 = new System.Windows.Forms.Label();
			this.cbbNational = new ComboBox();
			this.label18 = new System.Windows.Forms.Label();
			this.txtProductMoney = new System.Windows.Forms.TextBox();
			this.label12 = new System.Windows.Forms.Label();
			this.dptProductExpiryDate = new DateTimePicker();
			this.label16 = new System.Windows.Forms.Label();
			this.dtpProductDate = new DateTimePicker();
			this.label15 = new System.Windows.Forms.Label();
			this.btnAddToBill = new System.Windows.Forms.Button();
			this.btnAdd = new System.Windows.Forms.Button();
			this.btnEdit = new System.Windows.Forms.Button();
			this.btnSave = new System.Windows.Forms.Button();
			this.btnPrint = new System.Windows.Forms.Button();
			this.btnDel = new System.Windows.Forms.Button();
			this.btnClose = new System.Windows.Forms.Button();
			this.dgvBill = new DataGridView();
			this.dataGridViewTextBoxColumn1 = new DataGridViewTextBoxColumn();
			this.dataGridViewTextBoxColumn7 = new DataGridViewTextBoxColumn();
			this.Column10 = new DataGridViewTextBoxColumn();
			this.Column11 = new DataGridViewTextBoxColumn();
			this.Column12 = new DataGridViewTextBoxColumn();
			this.Column13 = new DataGridViewTextBoxColumn();
			this.Column14 = new DataGridViewTextBoxColumn();
			this.Column19 = new DataGridViewTextBoxColumn();
			this.Column20 = new DataGridViewTextBoxColumn();
			this.Column21 = new DataGridViewTextBoxColumn();
			this.ctmJustBill = new ContextMenuStrip(this.components);
			this.ctmJustBillAdd = new ToolStripMenuItem();
			this.ctmJustBillEdit = new ToolStripMenuItem();
			this.ctmJustBillPrint = new ToolStripMenuItem();
			this.toolStripSeparator5 = new ToolStripSeparator();
			this.ctmJustBillDel = new ToolStripMenuItem();
			this.toolStripSeparator6 = new ToolStripSeparator();
			this.ctmJustBillSearch = new ToolStripMenuItem();
			this.groupBox3 = new System.Windows.Forms.GroupBox();
			this.label25 = new System.Windows.Forms.Label();
			this.label17 = new System.Windows.Forms.Label();
			this.btnSearchTime = new System.Windows.Forms.Button();
			this.dtpTo = new DateTimePicker();
			this.dtpFrom = new DateTimePicker();
			this.btnSearch = new System.Windows.Forms.Button();
			this.txtBalancerAllPacket = new System.Windows.Forms.TextBox();
			this.label20 = new System.Windows.Forms.Label();
			this.label26 = new System.Windows.Forms.Label();
			this.groupBox4 = new System.Windows.Forms.GroupBox();
			this.label8 = new System.Windows.Forms.Label();
			this.label9 = new System.Windows.Forms.Label();
			this.label10 = new System.Windows.Forms.Label();
			this.lblProduct = new System.Windows.Forms.Button();
			this.lblPrice = new System.Windows.Forms.Button();
			this.lblMoney = new System.Windows.Forms.Button();
			this.lblNumber = new System.Windows.Forms.Button();
			this.lblUnit = new System.Windows.Forms.Button();
			this.lblPacket = new System.Windows.Forms.Button();
			this.txtMoney = new System.Windows.Forms.TextBox();
			this.label27 = new System.Windows.Forms.Label();
			this.toolTip1 = new ToolTip(this.components);
			this.btnExport = new System.Windows.Forms.Button();
			this.txtProductPrice1 = new System.Windows.Forms.TextBox();
			this.txtProductPrice2 = new System.Windows.Forms.TextBox();
			this.btnStopSlide = new System.Windows.Forms.Button();
			this.timer2 = new System.Windows.Forms.Timer(this.components);
			this.timer1 = new System.Windows.Forms.Timer(this.components);
			this.groupBox1.SuspendLayout();
			((ISupportInitialize)this.dgvProduct).BeginInit();
			this.cmsBill.SuspendLayout();
			((ISupportInitialize)this.dgvBill).BeginInit();
			this.ctmJustBill.SuspendLayout();
			this.groupBox3.SuspendLayout();
			this.groupBox4.SuspendLayout();
			base.SuspendLayout();
			this.groupBox1.Anchor = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right);
			this.groupBox1.Controls.Add(this.label4);
			this.groupBox1.Controls.Add(this.cbbWareHouseTerget);
			this.groupBox1.Controls.Add(this.label23);
			this.groupBox1.Controls.Add(this.cbbWareHouse);
			this.groupBox1.Controls.Add(this.btnAddCustomer);
			this.groupBox1.Controls.Add(this.txtDebt);
			this.groupBox1.Controls.Add(this.label6);
			this.groupBox1.Controls.Add(this.cbbProvider);
			this.groupBox1.Controls.Add(this.label5);
			this.groupBox1.Controls.Add(this.label2);
			this.groupBox1.Controls.Add(this.txtDate);
			this.groupBox1.Controls.Add(this.txtID);
			this.groupBox1.Controls.Add(this.label1);
			this.groupBox1.Font = new System.Drawing.Font("Arial", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.groupBox1.Location = new System.Drawing.Point(233, 5);
			this.groupBox1.Name = "groupBox1";
			this.groupBox1.Size = new Size(710, 94);
			this.groupBox1.TabIndex = 0;
			this.groupBox1.TabStop = false;
			this.groupBox1.Text = "Thông tin đơn hàng";
			this.label4.Anchor = (AnchorStyles.Top | AnchorStyles.Right);
			this.label4.BackColor = SystemColors.Control;
			this.label4.Font = new System.Drawing.Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.label4.ForeColor = SystemColors.MenuText;
//			this.label4.Image = (Image)componentResourceManager.GetObject("label4.Image");
			this.label4.Location = new System.Drawing.Point(484, 60);
			this.label4.Name = "label4";
			this.label4.Size = new Size(30, 21);
			this.label4.TabIndex = 87;
			this.label4.TextAlign = ContentAlignment.MiddleRight;
			this.cbbWareHouseTerget.Anchor = (AnchorStyles.Top | AnchorStyles.Right);
			this.cbbWareHouseTerget.Cursor = Cursors.Hand;
			this.cbbWareHouseTerget.DropDownStyle = ComboBoxStyle.DropDownList;
			this.cbbWareHouseTerget.Font = new System.Drawing.Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.cbbWareHouseTerget.FormattingEnabled = true;
			this.cbbWareHouseTerget.Location = new System.Drawing.Point(517, 59);
			this.cbbWareHouseTerget.Name = "cbbWareHouseTerget";
			this.cbbWareHouseTerget.Size = new Size(187, 23);
			this.cbbWareHouseTerget.TabIndex = 86;
			this.label23.BackColor = Color.FromArgb(255, 255, 192);
			this.label23.BorderStyle = BorderStyle.Fixed3D;
			this.label23.Font = new System.Drawing.Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.label23.ForeColor = SystemColors.MenuText;
			this.label23.Location = new System.Drawing.Point(211, 60);
			this.label23.Name = "label23";
			this.label23.Size = new Size(87, 21);
			this.label23.TabIndex = 85;
			this.label23.Text = "Kho xuất :";
			this.label23.TextAlign = ContentAlignment.MiddleRight;
			this.cbbWareHouse.Anchor = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right);
			this.cbbWareHouse.Cursor = Cursors.Hand;
			this.cbbWareHouse.DropDownStyle = ComboBoxStyle.DropDownList;
			this.cbbWareHouse.Font = new System.Drawing.Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.cbbWareHouse.FormattingEnabled = true;
			this.cbbWareHouse.Location = new System.Drawing.Point(301, 59);
			this.cbbWareHouse.Name = "cbbWareHouse";
			this.cbbWareHouse.Size = new Size(181, 23);
			this.cbbWareHouse.TabIndex = 5;
			this.btnAddCustomer.Anchor = (AnchorStyles.Top | AnchorStyles.Right);
			this.btnAddCustomer.FlatAppearance.BorderSize = 0;
			this.btnAddCustomer.FlatStyle = FlatStyle.Flat;
			//this.btnAddCustomer.Image = (Image)componentResourceManager.GetObject("btnAddCustomer.Image");
			this.btnAddCustomer.Location = new System.Drawing.Point(466, 29);
			this.btnAddCustomer.Name = "btnAddCustomer";
			this.btnAddCustomer.Size = new Size(16, 16);
			this.btnAddCustomer.TabIndex = 80;
			this.btnAddCustomer.TextAlign = ContentAlignment.MiddleRight;
			this.toolTip1.SetToolTip(this.btnAddCustomer, "Thêm mới khách hàng");
			this.btnAddCustomer.UseVisualStyleBackColor = true;
			this.btnAddCustomer.Click += new EventHandler(this.btnAddCustomer_Click);
			this.txtDebt.Anchor = (AnchorStyles.Top | AnchorStyles.Right);
			this.txtDebt.BackColor = Color.White;
			this.txtDebt.Font = new System.Drawing.Font("Arial", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.txtDebt.ForeColor = Color.Red;
			this.txtDebt.Location = new System.Drawing.Point(588, 28);
			this.txtDebt.Name = "txtDebt";
			this.txtDebt.ReadOnly = true;
			this.txtDebt.Size = new Size(115, 22);
			this.txtDebt.TabIndex = 4;
			this.txtDebt.Text = "0";
			this.txtDebt.TextAlign = HorizontalAlignment.Right;
			this.txtDebt.TextChanged += new EventHandler(this.txtDebt_TextChanged);
			this.txtDebt.Leave += new EventHandler(this.txtDebt_Leave);
			this.txtDebt.KeyPress += new KeyPressEventHandler(this.txtDebt_KeyPress);
			this.txtDebt.Enter += new EventHandler(this.txtDebt_Enter);
			this.label6.Anchor = (AnchorStyles.Top | AnchorStyles.Right);
			this.label6.BackColor = Color.FromArgb(255, 255, 192);
			this.label6.BorderStyle = BorderStyle.Fixed3D;
			this.label6.Font = new System.Drawing.Font("Arial", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.label6.Location = new System.Drawing.Point(504, 28);
			this.label6.Name = "label6";
			this.label6.Size = new Size(81, 21);
			this.label6.TabIndex = 12;
			this.label6.Text = "Công nợ :";
			this.label6.TextAlign = ContentAlignment.MiddleRight;
			this.cbbProvider.Anchor = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right);
			this.cbbProvider.DropDownStyle = ComboBoxStyle.DropDownList;
			this.cbbProvider.Font = new System.Drawing.Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.cbbProvider.FormattingEnabled = true;
			this.cbbProvider.Location = new System.Drawing.Point(301, 27);
			this.cbbProvider.Name = "cbbProvider";
			this.cbbProvider.Size = new Size(200, 23);
			this.cbbProvider.TabIndex = 2;
			this.cbbProvider.SelectedIndexChanged += new EventHandler(this.cbbProvider_SelectedIndexChanged);
			this.cbbProvider.KeyPress += new KeyPressEventHandler(this.cbbProvider_KeyPress);
			this.cbbProvider.SelectedValueChanged += new EventHandler(this.cbbProvider_SelectedIndexChanged);
			this.label5.BackColor = Color.FromArgb(255, 255, 192);
			this.label5.BorderStyle = BorderStyle.Fixed3D;
			this.label5.Font = new System.Drawing.Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.label5.Location = new System.Drawing.Point(211, 28);
			this.label5.Name = "label5";
			this.label5.Size = new Size(87, 21);
			this.label5.TabIndex = 10;
			this.label5.Text = "Khách hàng :";
			this.label5.TextAlign = ContentAlignment.MiddleRight;
			this.label2.BackColor = Color.FromArgb(255, 255, 192);
			this.label2.BorderStyle = BorderStyle.Fixed3D;
			this.label2.Font = new System.Drawing.Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.label2.Location = new System.Drawing.Point(12, 60);
			this.label2.Name = "label2";
			this.label2.Size = new Size(91, 21);
			this.label2.TabIndex = 3;
			this.label2.Text = "Ngày xuất :";
			this.label2.TextAlign = ContentAlignment.MiddleRight;
			this.txtDate.CustomFormat = "dd/MM/yyyy";
			this.txtDate.Font = new System.Drawing.Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.txtDate.Format = DateTimePickerFormat.Custom;
			this.txtDate.Location = new System.Drawing.Point(107, 60);
			this.txtDate.Name = "txtDate";
			this.txtDate.Size = new Size(100, 22);
			this.txtDate.TabIndex = 1;
			this.txtDate.KeyPress += new KeyPressEventHandler(this.txtDate_KeyPress);
			this.txtID.BackColor = Color.White;
			this.txtID.CharacterCasing = CharacterCasing.Upper;
			this.txtID.Font = new System.Drawing.Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.txtID.Location = new System.Drawing.Point(107, 28);
			this.txtID.Name = "txtID";
			this.txtID.ReadOnly = true;
			this.txtID.Size = new Size(100, 22);
			this.txtID.TabIndex = 1;
			this.txtID.TextChanged += new EventHandler(this.txtID_TextChanged);
			this.txtID.Leave += new EventHandler(this.txtID_Leave);
			this.txtID.KeyPress += new KeyPressEventHandler(this.txtID_KeyPress);
			this.txtID.Enter += new EventHandler(this.txtID_Enter);
			this.label1.BackColor = Color.FromArgb(255, 255, 192);
			this.label1.BorderStyle = BorderStyle.Fixed3D;
			this.label1.Font = new System.Drawing.Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.label1.Location = new System.Drawing.Point(12, 28);
			this.label1.Name = "label1";
			this.label1.Size = new Size(91, 21);
			this.label1.TabIndex = 0;
			this.label1.Text = "Số hoá đơn :";
			this.label1.TextAlign = ContentAlignment.MiddleRight;
			this.txtMoneyAfterDiscount.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
			this.txtMoneyAfterDiscount.BackColor = Color.FromArgb(255, 255, 192);
			this.txtMoneyAfterDiscount.BorderStyle = BorderStyle.FixedSingle;
			this.txtMoneyAfterDiscount.Font = new System.Drawing.Font("Arial", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.txtMoneyAfterDiscount.ForeColor = Color.Blue;
			this.txtMoneyAfterDiscount.Location = new System.Drawing.Point(666, 534);
			this.txtMoneyAfterDiscount.Name = "txtMoneyAfterDiscount";
			this.txtMoneyAfterDiscount.Size = new Size(78, 22);
			this.txtMoneyAfterDiscount.TabIndex = 14;
			this.txtMoneyAfterDiscount.Text = "0";
			this.txtMoneyAfterDiscount.TextAlign = HorizontalAlignment.Right;
			this.txtMoneyAfterDiscount.Leave += new EventHandler(this.txtMoneyAfterDiscount_Leave);
			this.txtMoneyAfterDiscount.KeyPress += new KeyPressEventHandler(this.txtMoneyAfterDiscount_KeyPress);
			this.txtMoneyAfterDiscount.Enter += new EventHandler(this.txtMoneyAfterDiscount_Enter);
			this.txtDiscountOut.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
			this.txtDiscountOut.BackColor = Color.FromArgb(255, 255, 192);
			this.txtDiscountOut.BorderStyle = BorderStyle.FixedSingle;
			this.txtDiscountOut.Font = new System.Drawing.Font("Arial", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.txtDiscountOut.ForeColor = Color.Blue;
			this.txtDiscountOut.Location = new System.Drawing.Point(638, 534);
			this.txtDiscountOut.Name = "txtDiscountOut";
			this.txtDiscountOut.ReadOnly = true;
			this.txtDiscountOut.Size = new Size(26, 22);
			this.txtDiscountOut.TabIndex = 13;
			this.txtDiscountOut.Text = "0";
			this.txtDiscountOut.TextAlign = HorizontalAlignment.Right;
			this.txtDiscountOut.TextChanged += new EventHandler(this.txtDiscountIn_TextChanged);
			this.txtDiscountOut.Leave += new EventHandler(this.txtDiscountOut_Leave);
			this.txtDiscountOut.KeyPress += new KeyPressEventHandler(this.txtDiscountOut_KeyPress);
			this.txtDiscountOut.Enter += new EventHandler(this.txtDiscountOut_Enter);
			this.label22.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
			this.label22.AutoSize = true;
			this.label22.BackColor = SystemColors.ActiveCaption;
			this.label22.Font = new System.Drawing.Font("Arial", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.label22.Location = new System.Drawing.Point(571, 537);
			this.label22.Name = "label22";
			this.label22.Size = new Size(64, 16);
			this.label22.TabIndex = 21;
			this.label22.Text = "CK [ % ] :";
			this.txtNote.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right);
			this.txtNote.Font = new System.Drawing.Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.txtNote.Location = new System.Drawing.Point(237, 534);
			this.txtNote.Name = "txtNote";
			this.txtNote.Size = new Size(330, 22);
			this.txtNote.TabIndex = 12;
			this.txtNote.Leave += new EventHandler(this.txtNote_Leave);
			this.txtNote.KeyPress += new KeyPressEventHandler(this.txtNote_KeyPress);
			this.txtNote.Enter += new EventHandler(this.txtNote_Enter);
			this.txtTotalMoney.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
			this.txtTotalMoney.BackColor = Color.FromArgb(255, 255, 192);
			this.txtTotalMoney.BorderStyle = BorderStyle.FixedSingle;
			this.txtTotalMoney.Font = new System.Drawing.Font("Arial", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.txtTotalMoney.ForeColor = Color.Blue;
			this.txtTotalMoney.Location = new System.Drawing.Point(834, 534);
			this.txtTotalMoney.Name = "txtTotalMoney";
			this.txtTotalMoney.ReadOnly = true;
			this.txtTotalMoney.Size = new Size(106, 22);
			this.txtTotalMoney.TabIndex = 15;
			this.txtTotalMoney.Text = "0";
			this.txtTotalMoney.TextAlign = HorizontalAlignment.Right;
			this.txtTotalMoney.Leave += new EventHandler(this.txtTotalMoney_Leave);
			this.txtTotalMoney.Enter += new EventHandler(this.txtTotalMoney_Enter);
			this.label7.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
			this.label7.AutoSize = true;
			this.label7.BackColor = SystemColors.ActiveCaption;
			this.label7.Font = new System.Drawing.Font("Arial", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.label7.Location = new System.Drawing.Point(754, 513);
			this.label7.Name = "label7";
			this.label7.Size = new Size(76, 16);
			this.label7.TabIndex = 14;
			this.label7.Text = "Tổng tiền :";
			this.dgvProduct.AllowUserToAddRows = false;
			this.dgvProduct.AllowUserToDeleteRows = false;
			this.dgvProduct.AllowUserToOrderColumns = true;
			this.dgvProduct.AllowUserToResizeColumns = false;
			this.dgvProduct.AllowUserToResizeRows = false;
			dataGridViewCellStyle.BackColor = Color.White;
			dataGridViewCellStyle.Font = new System.Drawing.Font("Arial", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.dgvProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle;
			this.dgvProduct.Anchor = (AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right);
			this.dgvProduct.BackgroundColor = Color.White;
			this.dgvProduct.BorderStyle = BorderStyle.Fixed3D;
			this.dgvProduct.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
			this.dgvProduct.ColumnHeadersVisible = false;
			this.dgvProduct.Columns.AddRange(new DataGridViewColumn[]
			{
				this.Column2,
				this.Column1,
				this.Column3,
				this.Column5,
				this.Column4,
				this.Column6,
				this.Column7,
				this.Column8,
				this.Column9,
				this.Column15,
				this.Column16,
				this.Column17,
				this.VAT,
				this.possName
			});
			this.dgvProduct.ContextMenuStrip = this.cmsBill;
			this.dgvProduct.Cursor = Cursors.Hand;
			this.dgvProduct.EnableHeadersVisualStyles = false;
			this.dgvProduct.Location = new System.Drawing.Point(233, 159);
			this.dgvProduct.MultiSelect = false;
			this.dgvProduct.Name = "dgvProduct";
			this.dgvProduct.ReadOnly = true;
			this.dgvProduct.RowHeadersVisible = false;
			this.dgvProduct.RowHeadersWidthSizeMode = DataGridViewRowHeadersWidthSizeMode.DisableResizing;
			this.dgvProduct.RowTemplate.DefaultCellStyle.Font = new System.Drawing.Font("Arial", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.dgvProduct.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
			this.dgvProduct.Size = new Size(710, 344);
			this.dgvProduct.StandardTab = true;
			this.dgvProduct.TabIndex = 11;
			this.dgvProduct.KeyDown += new KeyEventHandler(this.dgvProduct_KeyDown);
			this.dgvProduct.CellEnter += new DataGridViewCellEventHandler(this.dgvProduct_CellEnter);
			this.Column2.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
			this.Column2.DataPropertyName = "productName";
			this.Column2.HeaderText = "Sản phẩm";
			this.Column2.Name = "Column2";
			this.Column2.ReadOnly = true;
			this.Column2.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.Column1.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Column1.DataPropertyName = "Packet";
			this.Column1.HeaderText = "Số lô";
			this.Column1.MinimumWidth = 105;
			this.Column1.Name = "Column1";
			this.Column1.ReadOnly = true;
			this.Column1.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.Column1.Width = 105;
			this.Column3.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Column3.DataPropertyName = "productUnit";
			this.Column3.HeaderText = "Đơn vị tính";
			this.Column3.MinimumWidth = 130;
			this.Column3.Name = "Column3";
			this.Column3.ReadOnly = true;
			this.Column3.Width = 130;
			this.Column5.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Column5.DataPropertyName = "productPrice";
			dataGridViewCellStyle2.Alignment = DataGridViewContentAlignment.MiddleRight;
			dataGridViewCellStyle2.Format = "N0";
			dataGridViewCellStyle2.NullValue = null;
			this.Column5.DefaultCellStyle = dataGridViewCellStyle2;
			this.Column5.HeaderText = "Đơn giá";
			this.Column5.MinimumWidth = 85;
			this.Column5.Name = "Column5";
			this.Column5.ReadOnly = true;
			this.Column5.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.Column5.Width = 85;
			this.Column4.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Column4.DataPropertyName = "productNumber";
			dataGridViewCellStyle3.Alignment = DataGridViewContentAlignment.MiddleRight;
			dataGridViewCellStyle3.Format = "N0";
			dataGridViewCellStyle3.NullValue = null;
			this.Column4.DefaultCellStyle = dataGridViewCellStyle3;
			this.Column4.HeaderText = "Số lượng";
			this.Column4.MinimumWidth = 92;
			this.Column4.Name = "Column4";
			this.Column4.ReadOnly = true;
			this.Column4.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.Column4.Width = 92;
			this.Column6.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Column6.DataPropertyName = "ProductMoney";
			dataGridViewCellStyle4.Alignment = DataGridViewContentAlignment.MiddleRight;
			dataGridViewCellStyle4.Format = "N0";
			dataGridViewCellStyle4.NullValue = null;
			this.Column6.DefaultCellStyle = dataGridViewCellStyle4;
			this.Column6.HeaderText = "Thành tiền";
			this.Column6.MinimumWidth = 110;
			this.Column6.Name = "Column6";
			this.Column6.ReadOnly = true;
			this.Column6.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.Column6.Width = 110;
			this.Column7.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Column7.DataPropertyName = "ProductDate";
			dataGridViewCellStyle5.Format = "dd/MM/yyyy";
			this.Column7.DefaultCellStyle = dataGridViewCellStyle5;
			this.Column7.HeaderText = "Ngày SX";
			this.Column7.MinimumWidth = 80;
			this.Column7.Name = "Column7";
			this.Column7.ReadOnly = true;
			this.Column7.Visible = false;
			this.Column7.Width = 80;
			this.Column8.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Column8.DataPropertyName = "ProductExpiryDate";
			dataGridViewCellStyle6.Format = "dd/MM/yyyy";
			this.Column8.DefaultCellStyle = dataGridViewCellStyle6;
			this.Column8.HeaderText = "Hạn dùng";
			this.Column8.MinimumWidth = 90;
			this.Column8.Name = "Column8";
			this.Column8.ReadOnly = true;
			this.Column8.Visible = false;
			this.Column8.Width = 90;
			this.Column9.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Column9.DataPropertyName = "Pid";
			this.Column9.HeaderText = "Mã sản phẩm";
			this.Column9.Name = "Column9";
			this.Column9.ReadOnly = true;
			this.Column9.Visible = false;
			this.Column15.DataPropertyName = "productPrice";
			this.Column15.HeaderText = "Giá nhập";
			this.Column15.Name = "Column15";
			this.Column15.ReadOnly = true;
			this.Column15.Visible = false;
			this.Column16.DataPropertyName = "productPrice2";
			this.Column16.HeaderText = "Giá bán lẻ";
			this.Column16.Name = "Column16";
			this.Column16.ReadOnly = true;
			this.Column16.Visible = false;
			this.Column17.DataPropertyName = "NationalID";
			this.Column17.HeaderText = "NationalID";
			this.Column17.Name = "Column17";
			this.Column17.ReadOnly = true;
			this.Column17.Visible = false;
			this.VAT.DataPropertyName = "VAT";
			this.VAT.HeaderText = "  VAT";
			this.VAT.MinimumWidth = 55;
			this.VAT.Name = "VAT";
			this.VAT.ReadOnly = true;
			this.VAT.Visible = false;
			this.VAT.Width = 55;
			this.possName.DataPropertyName = "possName";
			this.possName.HeaderText = "possName";
			this.possName.Name = "possName";
			this.possName.ReadOnly = true;
			this.possName.Visible = false;
			this.cmsBill.Font = new System.Drawing.Font("Arial", 9f, FontStyle.Regular, GraphicsUnit.Point, 163);
			this.cmsBill.Items.AddRange(new ToolStripItem[]
			{
				this.cmsAddProduct,
				this.toolStripSeparator4,
				this.cmsDelProduct,
				this.toolStripSeparator1,
				this.cmsAddBill,
				this.cmsEditBill,
				this.toolStripSeparator2,
				this.cmsSaveBill,
				this.cmsPrintBill,
				this.cmsDellBill,
				this.toolStripSeparator3,
				this.cmsSearchBill
			});
			this.cmsBill.Name = "cmsBill";
			this.cmsBill.Size = new Size(263, 204);
			this.cmsAddProduct.Name = "cmsAddProduct";
			this.cmsAddProduct.Size = new Size(262, 22);
			this.cmsAddProduct.Text = "Thêm sản phẩm";
			this.cmsAddProduct.Click += new EventHandler(this.btnSelect_Click);
			this.toolStripSeparator4.Name = "toolStripSeparator4";
			this.toolStripSeparator4.Size = new Size(259, 6);
			this.cmsDelProduct.Name = "cmsDelProduct";
			this.cmsDelProduct.ShortcutKeys = Keys.Delete;
			this.cmsDelProduct.Size = new Size(262, 22);
			this.cmsDelProduct.Text = "Xoá sản phẩm khỏi đơn hàng";
			this.cmsDelProduct.Click += new EventHandler(this.cmsDelProduct_Click);
			this.toolStripSeparator1.Name = "toolStripSeparator1";
			this.toolStripSeparator1.Size = new Size(259, 6);
			this.cmsAddBill.Name = "cmsAddBill";
			this.cmsAddBill.Size = new Size(262, 22);
			this.cmsAddBill.Text = "Tạo mới đơn hàng";
			this.cmsAddBill.Click += new EventHandler(this.cmsAddBill_Click);
			this.cmsEditBill.Name = "cmsEditBill";
			this.cmsEditBill.Size = new Size(262, 22);
			this.cmsEditBill.Text = "Sửa đơn hàng";
			this.cmsEditBill.Click += new EventHandler(this.cmsEditBill_Click);
			this.toolStripSeparator2.Name = "toolStripSeparator2";
			this.toolStripSeparator2.Size = new Size(259, 6);
			this.cmsSaveBill.Enabled = false;
			this.cmsSaveBill.Name = "cmsSaveBill";
			this.cmsSaveBill.Size = new Size(262, 22);
			this.cmsSaveBill.Text = "Lưu đơn hàng";
			this.cmsSaveBill.Click += new EventHandler(this.cmsSaveBill_Click);
			this.cmsPrintBill.Enabled = false;
			this.cmsPrintBill.Name = "cmsPrintBill";
			this.cmsPrintBill.Size = new Size(262, 22);
			this.cmsPrintBill.Text = "In hoá đơn";
			this.cmsPrintBill.Click += new EventHandler(this.cmsPrintBill_Click);
			this.cmsDellBill.Enabled = false;
			this.cmsDellBill.Name = "cmsDellBill";
			this.cmsDellBill.Size = new Size(262, 22);
			this.cmsDellBill.Text = "Xoá hoá đơn";
			this.cmsDellBill.DisplayStyleChanged += new EventHandler(this.cmsDellBill_Click);
			this.toolStripSeparator3.Name = "toolStripSeparator3";
			this.toolStripSeparator3.Size = new Size(259, 6);
			this.cmsSearchBill.Name = "cmsSearchBill";
			this.cmsSearchBill.Size = new Size(262, 22);
			this.cmsSearchBill.Text = "Tìm kiếm";
			this.cmsSearchBill.Click += new EventHandler(this.cmsSearchBill_Click);
			this.btnListUnit.Anchor = (AnchorStyles.Top | AnchorStyles.Right);
			this.btnListUnit.BackColor = Color.FromArgb(255, 255, 192);
			this.btnListUnit.FlatAppearance.BorderSize = 0;
			this.btnListUnit.FlatStyle = FlatStyle.Flat;
//			this.btnListUnit.Image = (Image)componentResourceManager.GetObject("btnListUnit.Image");
			this.btnListUnit.Location = new System.Drawing.Point(632, 130);
			this.btnListUnit.Name = "btnListUnit";
			this.btnListUnit.Size = new Size(18, 18);
			this.btnListUnit.TabIndex = 130;
			this.toolTip1.SetToolTip(this.btnListUnit, "Chọn đơn vị khác của sản phẩm");
			this.btnListUnit.UseVisualStyleBackColor = false;
			this.btnListUnit.Click += new EventHandler(this.btnListUnit_Click);
			this.lblPossName.Anchor = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right);
			this.lblPossName.BackColor = Color.White;
			this.lblPossName.BorderStyle = BorderStyle.Fixed3D;
			this.lblPossName.Font = new System.Drawing.Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.lblPossName.ForeColor = Color.Blue;
			this.lblPossName.Location = new System.Drawing.Point(885, 129);
			this.lblPossName.Name = "lblPossName";
			this.lblPossName.Size = new Size(10, 22);
			this.lblPossName.TabIndex = 440;
			this.lblPossName.Text = "-:-";
			this.lblPossName.TextAlign = ContentAlignment.MiddleLeft;
			this.label3.AutoSize = true;
			this.label3.Location = new System.Drawing.Point(845, 132);
			this.label3.Name = "label3";
			this.label3.Size = new Size(36, 15);
			this.label3.TabIndex = 43;
			this.label3.Text = "Vị trí :";
			this.txtBarcode.BackColor = Color.FromArgb(255, 255, 192);
			this.txtBarcode.Font = new System.Drawing.Font("Arial", 12f, FontStyle.Bold);
			this.txtBarcode.Location = new System.Drawing.Point(8, 26);
			this.txtBarcode.Name = "txtBarcode";
			this.txtBarcode.ReadOnly = true;
			this.txtBarcode.Size = new Size(209, 26);
			this.txtBarcode.TabIndex = 44;
			this.txtBarcode.TextChanged += new EventHandler(this.txtBarcode_TextChanged);
			this.txtBarcode.KeyDown += new KeyEventHandler(this.txtBarcode_KeyDown);
			this.btnSelect.Anchor = (AnchorStyles.Top | AnchorStyles.Right);
			this.btnSelect.BackColor = Color.White;
			this.btnSelect.Enabled = false;
			this.btnSelect.FlatAppearance.BorderColor = Color.Cyan;
			this.btnSelect.FlatStyle = FlatStyle.Flat;
//			this.btnSelect.Image = (Image)componentResourceManager.GetObject("btnSelect.Image");
			this.btnSelect.Location = new System.Drawing.Point(396, 131);
			this.btnSelect.Name = "btnSelect";
			this.btnSelect.Size = new Size(22, 16);
			this.btnSelect.TabIndex = 955;
			this.toolTip1.SetToolTip(this.btnSelect, "Chọn sản phẩm cần xuất");
			this.btnSelect.UseVisualStyleBackColor = false;
			this.btnSelect.Click += new EventHandler(this.btnSelect_Click);
			this.cbbPacket.Anchor = (AnchorStyles.Top | AnchorStyles.Right);
			this.cbbPacket.BackColor = Color.White;
			this.cbbPacket.DropDownStyle = ComboBoxStyle.DropDownList;
			this.cbbPacket.FlatStyle = FlatStyle.Flat;
			this.cbbPacket.FormattingEnabled = true;
			this.cbbPacket.Location = new System.Drawing.Point(421, 128);
			this.cbbPacket.Name = "cbbPacket";
			this.cbbPacket.Size = new Size(103, 23);
			this.cbbPacket.TabIndex = 7;
			this.cbbPacket.SelectedIndexChanged += new EventHandler(this.cbbPacket_SelectedIndexChanged);
			this.cbbPacket.KeyPress += new KeyPressEventHandler(this.cbbPacket_KeyPress);
			this.cbbPacket.SelectedValueChanged += new EventHandler(this.cbbPacket_SelectedIndexChanged);
			this.txtProductPrice.Anchor = (AnchorStyles.Top | AnchorStyles.Right);
			this.txtProductPrice.BackColor = Color.White;
			this.txtProductPrice.Font = new System.Drawing.Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.txtProductPrice.Location = new System.Drawing.Point(655, 129);
			this.txtProductPrice.Name = "txtProductPrice";
			this.txtProductPrice.ReadOnly = true;
			this.txtProductPrice.Size = new Size(84, 22);
			this.txtProductPrice.TabIndex = 9;
			this.txtProductPrice.TextAlign = HorizontalAlignment.Right;
			this.txtProductPrice.TextChanged += new EventHandler(this.txtProductPrice_TextChanged);
			this.txtProductPrice.Leave += new EventHandler(this.txtProductPrice_Leave);
			this.txtProductPrice.KeyPress += new KeyPressEventHandler(this.txtProductPrice_KeyPress);
			this.txtProductPrice.Enter += new EventHandler(this.txtProductPrice_Enter);
			this.txtProductNumber.Anchor = (AnchorStyles.Top | AnchorStyles.Right);
			this.txtProductNumber.BackColor = Color.White;
			this.txtProductNumber.Font = new System.Drawing.Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.txtProductNumber.Location = new System.Drawing.Point(740, 129);
			this.txtProductNumber.Name = "txtProductNumber";
			this.txtProductNumber.Size = new Size(91, 22);
			this.txtProductNumber.TabIndex = 10;
			this.txtProductNumber.TextAlign = HorizontalAlignment.Right;
			this.txtProductNumber.TextChanged += new EventHandler(this.txtProductNumber_TextChanged);
			this.txtProductNumber.Leave += new EventHandler(this.txtProductNumber_Leave);
			this.txtProductNumber.KeyPress += new KeyPressEventHandler(this.txtProductNumber_KeyPress);
			this.txtProductNumber.Enter += new EventHandler(this.txtProductNumber_Enter);
			this.txtProductUnit.Anchor = (AnchorStyles.Top | AnchorStyles.Right);
			this.txtProductUnit.BackColor = Color.White;
			this.txtProductUnit.Font = new System.Drawing.Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.txtProductUnit.Location = new System.Drawing.Point(524, 129);
			this.txtProductUnit.Name = "txtProductUnit";
			this.txtProductUnit.ReadOnly = true;
			this.txtProductUnit.Size = new Size(106, 22);
			this.txtProductUnit.TabIndex = 8;
			this.txtProductUnit.TextChanged += new EventHandler(this.txtProductUnit_TextChanged);
			this.txtProductUnit.Leave += new EventHandler(this.txtProductUnit_Leave);
			this.txtProductUnit.KeyPress += new KeyPressEventHandler(this.txtProductUnit_KeyPress);
			this.txtProductUnit.Enter += new EventHandler(this.txtProductUnit_Enter);
			this.txtProductName.Anchor = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right);
			this.txtProductName.BackColor = Color.White;
			this.txtProductName.Font = new System.Drawing.Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.txtProductName.Location = new System.Drawing.Point(237, 129);
			this.txtProductName.Name = "txtProductName";
			this.txtProductName.Size = new Size(183, 22);
			this.txtProductName.TabIndex = 6;
			this.txtProductName.TextChanged += new EventHandler(this.txtProductName_TextChanged);
			this.txtProductName.KeyDown += new KeyEventHandler(this.txtProductName_KeyDown);
			this.txtProductName.Leave += new EventHandler(this.txtProductName_Leave);
			this.txtProductName.KeyPress += new KeyPressEventHandler(this.txtProductName_KeyPress);
			this.txtProductName.Enter += new EventHandler(this.txtProductName_Enter);
			this.txtBalancer.BackColor = Color.White;
			this.txtBalancer.Font = new System.Drawing.Font("Arial", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.txtBalancer.Location = new System.Drawing.Point(625, 509);
			this.txtBalancer.Name = "txtBalancer";
			this.txtBalancer.ReadOnly = true;
			this.txtBalancer.Size = new Size(60, 22);
			this.txtBalancer.TabIndex = 170;
			this.txtBalancer.TextAlign = HorizontalAlignment.Right;
			this.txtBalancer.Leave += new EventHandler(this.txtBalancer_Leave);
			this.label21.AutoSize = true;
			this.label21.Font = new System.Drawing.Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.label21.ForeColor = Color.Blue;
			this.label21.Location = new System.Drawing.Point(564, 512);
			this.label21.Name = "label21";
			this.label21.Size = new Size(58, 15);
			this.label21.TabIndex = 45;
			this.label21.Text = "Tồn kho :";
			this.cbbNational.BackColor = Color.White;
			this.cbbNational.DropDownStyle = ComboBoxStyle.DropDownList;
			this.cbbNational.Enabled = false;
			this.cbbNational.FormattingEnabled = true;
			this.cbbNational.Items.AddRange(new object[]
			{
				"      0%",
				"      5%",
				"    10%"
			});
			this.cbbNational.Location = new System.Drawing.Point(850, 130);
			this.cbbNational.Name = "cbbNational";
			this.cbbNational.Size = new Size(29, 23);
			this.cbbNational.TabIndex = 158;
			this.label18.AutoSize = true;
			this.label18.Location = new System.Drawing.Point(795, 134);
			this.label18.Name = "label18";
			this.label18.Size = new Size(53, 15);
			this.label18.TabIndex = 32;
			this.label18.Text = "Xuất xứ :";
			this.txtProductMoney.BackColor = Color.White;
			this.txtProductMoney.Font = new System.Drawing.Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.txtProductMoney.Location = new System.Drawing.Point(501, 509);
			this.txtProductMoney.Name = "txtProductMoney";
			this.txtProductMoney.ReadOnly = true;
			this.txtProductMoney.Size = new Size(51, 22);
			this.txtProductMoney.TabIndex = 160;
			this.txtProductMoney.TextAlign = HorizontalAlignment.Right;
			this.txtProductMoney.TextChanged += new EventHandler(this.txtProductMoney_TextChanged);
			this.txtProductMoney.Leave += new EventHandler(this.txtProductMoney_Leave);
			this.label12.AutoSize = true;
			this.label12.Location = new System.Drawing.Point(426, 512);
			this.label12.Name = "label12";
			this.label12.Size = new Size(71, 15);
			this.label12.TabIndex = 22;
			this.label12.Text = "Thành tiền :";
			this.dptProductExpiryDate.CalendarForeColor = Color.Red;
			this.dptProductExpiryDate.CustomFormat = "dd/MM/yyyy";
			this.dptProductExpiryDate.Format = DateTimePickerFormat.Custom;
			this.dptProductExpiryDate.Location = new System.Drawing.Point(623, 508);
			this.dptProductExpiryDate.Name = "dptProductExpiryDate";
			this.dptProductExpiryDate.Size = new Size(100, 21);
			this.dptProductExpiryDate.TabIndex = 140;
			this.label16.AutoSize = true;
			this.label16.ForeColor = Color.Red;
			this.label16.Location = new System.Drawing.Point(581, 511);
			this.label16.Name = "label16";
			this.label16.Size = new Size(39, 15);
			this.label16.TabIndex = 30;
			this.label16.Text = "HSD :";
			this.dtpProductDate.CustomFormat = "dd/MM/yyyy";
			this.dtpProductDate.Format = DateTimePickerFormat.Custom;
			this.dtpProductDate.Location = new System.Drawing.Point(478, 508);
			this.dtpProductDate.Name = "dtpProductDate";
			this.dtpProductDate.Size = new Size(100, 21);
			this.dtpProductDate.TabIndex = 130;
			this.label15.AutoSize = true;
			this.label15.ForeColor = Color.Red;
			this.label15.Location = new System.Drawing.Point(417, 511);
			this.label15.Name = "label15";
			this.label15.Size = new Size(59, 15);
			this.label15.TabIndex = 28;
			this.label15.Text = "Ngày SX :";
			this.btnAddToBill.BackColor = Color.White;
			this.btnAddToBill.Enabled = false;
			this.btnAddToBill.FlatAppearance.BorderColor = Color.FromArgb(192, 255, 255);
			this.btnAddToBill.FlatStyle = FlatStyle.Flat;
			this.btnAddToBill.Location = new System.Drawing.Point(7, 968);
			this.btnAddToBill.Name = "btnAddToBill";
			this.btnAddToBill.Size = new Size(140, 26);
			this.btnAddToBill.TabIndex = 150;
			this.btnAddToBill.Text = "Thêm sản phẩm  [ F3 ]";
			this.btnAddToBill.UseVisualStyleBackColor = false;
			this.btnAddToBill.Click += new EventHandler(this.btnAddToBill_Click);
			this.btnAdd.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.btnAdd.Font = new System.Drawing.Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnAdd.Location = new System.Drawing.Point(6, 566);
			this.btnAdd.Name = "btnAdd";
			this.btnAdd.Size = new Size(103, 30);
			this.btnAdd.TabIndex = 0;
			this.btnAdd.Text = "Thêm mới [ F4 ]";
			this.btnAdd.UseVisualStyleBackColor = true;
			this.btnAdd.Click += new EventHandler(this.btnAdd_Click);
			this.btnEdit.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.btnEdit.Enabled = false;
			this.btnEdit.Font = new System.Drawing.Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnEdit.Location = new System.Drawing.Point(109, 566);
			this.btnEdit.Name = "btnEdit";
			this.btnEdit.Size = new Size(120, 30);
			this.btnEdit.TabIndex = 19;
			this.btnEdit.Text = "Sửa hoá đơn [ F5 ]";
			this.btnEdit.UseVisualStyleBackColor = true;
			this.btnEdit.Click += new EventHandler(this.btnEdit_Click);
			this.btnSave.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.btnSave.Enabled = false;
			this.btnSave.Font = new System.Drawing.Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnSave.Location = new System.Drawing.Point(229, 566);
			this.btnSave.Name = "btnSave";
			this.btnSave.Size = new Size(118, 30);
			this.btnSave.TabIndex = 15;
			this.btnSave.Text = "Lưu hoá đơn [ F6 ]";
			this.btnSave.UseVisualStyleBackColor = true;
			this.btnSave.Click += new EventHandler(this.btnSave_Click);
			this.btnSave.EnabledChanged += new EventHandler(this.btnSave_EnabledChanged);
			this.btnPrint.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.btnPrint.Enabled = false;
			this.btnPrint.Font = new System.Drawing.Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnPrint.Location = new System.Drawing.Point(347, 566);
			this.btnPrint.Name = "btnPrint";
			this.btnPrint.Size = new Size(102, 30);
			this.btnPrint.TabIndex = 16;
			this.btnPrint.Text = "Xem và in [ F7 ]";
			this.btnPrint.UseVisualStyleBackColor = true;
			this.btnPrint.Click += new EventHandler(this.btnPrint_Click);
			this.btnPrint.EnabledChanged += new EventHandler(this.btnPrint_EnabledChanged);
			this.btnDel.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.btnDel.Enabled = false;
			this.btnDel.Font = new System.Drawing.Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnDel.Location = new System.Drawing.Point(449, 566);
			this.btnDel.Name = "btnDel";
			this.btnDel.Size = new Size(118, 30);
			this.btnDel.TabIndex = 17;
			this.btnDel.Text = "Xoá hoá đơn [ F8 ]";
			this.btnDel.UseVisualStyleBackColor = true;
			this.btnDel.Click += new EventHandler(this.btnDel_Click);
			this.btnDel.EnabledChanged += new EventHandler(this.btnDel_EnabledChanged);
			this.btnClose.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
			this.btnClose.Font = new System.Drawing.Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnClose.Location = new System.Drawing.Point(833, 566);
			this.btnClose.Name = "btnClose";
			this.btnClose.Size = new Size(110, 30);
			this.btnClose.TabIndex = 38;
			this.btnClose.Text = "Thoát  [ ESC ]";
			this.btnClose.UseVisualStyleBackColor = true;
			this.btnClose.Click += new EventHandler(this.btnClose_Click);
			this.dgvBill.AllowUserToAddRows = false;
			this.dgvBill.AllowUserToDeleteRows = false;
			this.dgvBill.AllowUserToOrderColumns = true;
			this.dgvBill.AllowUserToResizeColumns = false;
			this.dgvBill.AllowUserToResizeRows = false;
			dataGridViewCellStyle7.BackColor = Color.FromArgb(192, 255, 255);
			dataGridViewCellStyle7.Font = new System.Drawing.Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.dgvBill.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle7;
			this.dgvBill.Anchor = (AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left);
			this.dgvBill.BackgroundColor = Color.White;
			this.dgvBill.BorderStyle = BorderStyle.Fixed3D;
			this.dgvBill.ColumnHeadersHeight = 26;
			this.dgvBill.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
			this.dgvBill.Columns.AddRange(new DataGridViewColumn[]
			{
				this.dataGridViewTextBoxColumn1,
				this.dataGridViewTextBoxColumn7,
				this.Column10,
				this.Column11,
				this.Column12,
				this.Column13,
				this.Column14,
				this.Column19,
				this.Column20,
				this.Column21
			});
			this.dgvBill.ContextMenuStrip = this.ctmJustBill;
			this.dgvBill.Cursor = Cursors.Hand;
			this.dgvBill.EnableHeadersVisualStyles = false;
			this.dgvBill.Location = new System.Drawing.Point(7, 222);
			this.dgvBill.MultiSelect = false;
			this.dgvBill.Name = "dgvBill";
			this.dgvBill.ReadOnly = true;
			this.dgvBill.RowHeadersVisible = false;
			this.dgvBill.RowHeadersWidthSizeMode = DataGridViewRowHeadersWidthSizeMode.DisableResizing;
			this.dgvBill.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
			this.dgvBill.Size = new Size(220, 338);
			this.dgvBill.TabIndex = 39;
			this.dgvBill.CellEnter += new DataGridViewCellEventHandler(this.dgvBill_CellEnter);
			this.dataGridViewTextBoxColumn1.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
			this.dataGridViewTextBoxColumn1.DataPropertyName = "ID";
			this.dataGridViewTextBoxColumn1.HeaderText = "Hoá đơn";
			this.dataGridViewTextBoxColumn1.MinimumWidth = 120;
			this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
			this.dataGridViewTextBoxColumn1.ReadOnly = true;
			this.dataGridViewTextBoxColumn7.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.dataGridViewTextBoxColumn7.DataPropertyName = "CreateDate";
			dataGridViewCellStyle8.Format = "D";
			dataGridViewCellStyle8.NullValue = null;
			this.dataGridViewTextBoxColumn7.DefaultCellStyle = dataGridViewCellStyle8;
			this.dataGridViewTextBoxColumn7.HeaderText = "Ngày lập";
			this.dataGridViewTextBoxColumn7.MinimumWidth = 88;
			this.dataGridViewTextBoxColumn7.Name = "dataGridViewTextBoxColumn7";
			this.dataGridViewTextBoxColumn7.ReadOnly = true;
			this.dataGridViewTextBoxColumn7.Width = 88;
			this.Column10.DataPropertyName = "TotalMoney";
			this.Column10.HeaderText = "TotalMoney";
			this.Column10.Name = "Column10";
			this.Column10.ReadOnly = true;
			this.Column10.Visible = false;
			this.Column11.DataPropertyName = "TypeInput";
			this.Column11.HeaderText = "TypeInput";
			this.Column11.Name = "Column11";
			this.Column11.ReadOnly = true;
			this.Column11.Visible = false;
			this.Column12.DataPropertyName = "WID";
			this.Column12.HeaderText = "WID";
			this.Column12.Name = "Column12";
			this.Column12.ReadOnly = true;
			this.Column12.Visible = false;
			this.Column13.DataPropertyName = "Note";
			this.Column13.HeaderText = "Note";
			this.Column13.Name = "Column13";
			this.Column13.ReadOnly = true;
			this.Column13.Visible = false;
			this.Column14.DataPropertyName = "PID";
			this.Column14.HeaderText = "PID";
			this.Column14.Name = "Column14";
			this.Column14.ReadOnly = true;
			this.Column14.Visible = false;
			this.Column19.DataPropertyName = "UserName";
			this.Column19.HeaderText = "Tài khoản";
			this.Column19.Name = "Column19";
			this.Column19.ReadOnly = true;
			this.Column19.Visible = false;
			this.Column20.DataPropertyName = "FullName";
			this.Column20.HeaderText = "Tên tài khoản";
			this.Column20.Name = "Column20";
			this.Column20.ReadOnly = true;
			this.Column20.Visible = false;
			this.Column21.DataPropertyName = "Printed";
			this.Column21.HeaderText = "Printed";
			this.Column21.Name = "Column21";
			this.Column21.ReadOnly = true;
			this.Column21.Visible = false;
			this.ctmJustBill.Font = new System.Drawing.Font("Arial", 9f, FontStyle.Regular, GraphicsUnit.Point, 163);
			this.ctmJustBill.Items.AddRange(new ToolStripItem[]
			{
				this.ctmJustBillAdd,
				this.ctmJustBillEdit,
				this.ctmJustBillPrint,
				this.toolStripSeparator5,
				this.ctmJustBillDel,
				this.toolStripSeparator6,
				this.ctmJustBillSearch
			});
			this.ctmJustBill.Name = "ctmJustBill";
			this.ctmJustBill.Size = new Size(177, 126);
			this.ctmJustBillAdd.Name = "ctmJustBillAdd";
			this.ctmJustBillAdd.Size = new Size(176, 22);
			this.ctmJustBillAdd.Text = "Thêm hoá đơn";
			this.ctmJustBillAdd.Click += new EventHandler(this.ctmJustBillAdd_Click);
			this.ctmJustBillEdit.Name = "ctmJustBillEdit";
			this.ctmJustBillEdit.Size = new Size(176, 22);
			this.ctmJustBillEdit.Text = "Sửa hoá đơn";
			this.ctmJustBillEdit.Click += new EventHandler(this.ctmJustBillEdit_Click);
			this.ctmJustBillPrint.Name = "ctmJustBillPrint";
			this.ctmJustBillPrint.Size = new Size(176, 22);
			this.ctmJustBillPrint.Text = "Xem và In hoá đơn";
			this.ctmJustBillPrint.Click += new EventHandler(this.ctmJustBillPrint_Click);
			this.toolStripSeparator5.Name = "toolStripSeparator5";
			this.toolStripSeparator5.Size = new Size(173, 6);
			this.ctmJustBillDel.Name = "ctmJustBillDel";
			this.ctmJustBillDel.Size = new Size(176, 22);
			this.ctmJustBillDel.Text = "Xoá hoá đơn";
			this.ctmJustBillDel.Click += new EventHandler(this.ctmJustBillDel_Click);
			this.toolStripSeparator6.Name = "toolStripSeparator6";
			this.toolStripSeparator6.Size = new Size(173, 6);
			this.ctmJustBillSearch.Name = "ctmJustBillSearch";
			this.ctmJustBillSearch.Size = new Size(176, 22);
			this.ctmJustBillSearch.Text = "Tìm kiếm hoá đơn";
			this.ctmJustBillSearch.Click += new EventHandler(this.ctmJustBillSearch_Click);
			this.groupBox3.Controls.Add(this.label25);
			this.groupBox3.Controls.Add(this.label17);
			this.groupBox3.Controls.Add(this.btnSearchTime);
			this.groupBox3.Controls.Add(this.dtpTo);
			this.groupBox3.Controls.Add(this.dtpFrom);
			this.groupBox3.Font = new System.Drawing.Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.groupBox3.Location = new System.Drawing.Point(7, 134);
			this.groupBox3.Name = "groupBox3";
			this.groupBox3.Size = new Size(220, 83);
			this.groupBox3.TabIndex = 40;
			this.groupBox3.TabStop = false;
			this.groupBox3.Text = "Tìm kiếm";
			this.label25.AutoSize = true;
			this.label25.Font = new System.Drawing.Font("Arial", 9f, FontStyle.Regular, GraphicsUnit.Point, 163);
			this.label25.Location = new System.Drawing.Point(4, 25);
			this.label25.Name = "label25";
			this.label25.Size = new Size(22, 15);
			this.label25.TabIndex = 152;
			this.label25.Text = "Từ";
			this.label17.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
//			this.label17.Image = (Image)componentResourceManager.GetObject("label17.Image");
			this.label17.Location = new System.Drawing.Point(112, 20);
			this.label17.Name = "label17";
			this.label17.Size = new Size(20, 25);
			this.label17.TabIndex = 151;
			this.btnSearchTime.FlatAppearance.BorderColor = Color.FromArgb(0, 192, 192);
			this.btnSearchTime.FlatStyle = FlatStyle.Flat;
			this.btnSearchTime.Font = new System.Drawing.Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnSearchTime.Location = new System.Drawing.Point(28, 48);
			this.btnSearchTime.Name = "btnSearchTime";
			this.btnSearchTime.Size = new Size(187, 28);
			this.btnSearchTime.TabIndex = 150;
			this.btnSearchTime.Text = "Tìm kiếm hóa đơn";
			this.btnSearchTime.UseVisualStyleBackColor = true;
			this.btnSearchTime.Click += new EventHandler(this.btnSearchTime_Click);
			this.dtpTo.CustomFormat = "dd/MM/yyyy";
			this.dtpTo.Font = new System.Drawing.Font("Arial", 9f, FontStyle.Regular, GraphicsUnit.Point, 163);
			this.dtpTo.Format = DateTimePickerFormat.Custom;
			this.dtpTo.Location = new System.Drawing.Point(134, 22);
			this.dtpTo.Name = "dtpTo";
			this.dtpTo.Size = new Size(81, 21);
			this.dtpTo.TabIndex = 149;
			this.dtpFrom.CustomFormat = "dd/MM/yyyy";
			this.dtpFrom.Font = new System.Drawing.Font("Arial", 9f, FontStyle.Regular, GraphicsUnit.Point, 163);
			this.dtpFrom.Format = DateTimePickerFormat.Custom;
			this.dtpFrom.Location = new System.Drawing.Point(28, 22);
			this.dtpFrom.Name = "dtpFrom";
			this.dtpFrom.Size = new Size(81, 21);
			this.dtpFrom.TabIndex = 148;
			this.btnSearch.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.btnSearch.Font = new System.Drawing.Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnSearch.Location = new System.Drawing.Point(567, 566);
			this.btnSearch.Name = "btnSearch";
			this.btnSearch.Size = new Size(98, 30);
			this.btnSearch.TabIndex = 18;
			this.btnSearch.Text = "Tìm kiếm [ F9 ]";
			this.btnSearch.UseVisualStyleBackColor = true;
			this.btnSearch.Click += new EventHandler(this.btnSearch_Click);
			this.txtBalancerAllPacket.BackColor = SystemColors.Control;
			this.txtBalancerAllPacket.Font = new System.Drawing.Font("Arial", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.txtBalancerAllPacket.Location = new System.Drawing.Point(843, 129);
			this.txtBalancerAllPacket.Name = "txtBalancerAllPacket";
			this.txtBalancerAllPacket.ReadOnly = true;
			this.txtBalancerAllPacket.Size = new Size(38, 22);
			this.txtBalancerAllPacket.TabIndex = 55;
			this.txtBalancerAllPacket.TextAlign = HorizontalAlignment.Right;
			this.label20.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.label20.AutoSize = true;
			this.label20.BackColor = SystemColors.ActiveCaption;
			this.label20.Font = new System.Drawing.Font("Arial", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.label20.ForeColor = SystemColors.MenuText;
			this.label20.Location = new System.Drawing.Point(235, 514);
			this.label20.Name = "label20";
			this.label20.Size = new Size(149, 16);
			this.label20.TabIndex = 56;
			this.label20.Text = "Diễn giải cho hoá đơn";
			this.label26.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right);
			this.label26.BackColor = SystemColors.ActiveCaption;
			this.label26.Font = new System.Drawing.Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.label26.Location = new System.Drawing.Point(233, 506);
			this.label26.Name = "label26";
			this.label26.Size = new Size(710, 54);
			this.label26.TabIndex = 153;
			this.groupBox4.Controls.Add(this.label8);
			this.groupBox4.Controls.Add(this.txtBarcode);
			this.groupBox4.Font = new System.Drawing.Font("Arial", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.groupBox4.ForeColor = Color.Blue;
			this.groupBox4.Location = new System.Drawing.Point(6, 3);
			this.groupBox4.Name = "groupBox4";
			this.groupBox4.Size = new Size(223, 96);
			this.groupBox4.TabIndex = 154;
			this.groupBox4.TabStop = false;
			this.groupBox4.Text = "Mã vạch sản phẩm";
			this.label8.Font = new System.Drawing.Font("Arial", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 163);
//			this.label8.Image = (Image)componentResourceManager.GetObject("label8.Image");
			this.label8.Location = new System.Drawing.Point(8, 56);
			this.label8.Name = "label8";
			this.label8.Size = new Size(209, 34);
			this.label8.TabIndex = 34;
			this.label8.DoubleClick += new EventHandler(this.label28_DoubleClick);
			this.label9.Anchor = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right);
			this.label9.BackColor = Color.FromArgb(255, 255, 192);
			this.label9.Location = new System.Drawing.Point(233, 104);
			this.label9.Name = "label9";
			this.label9.Size = new Size(710, 50);
			this.label9.TabIndex = 155;
			this.label10.BackColor = Color.FromArgb(255, 255, 192);
			this.label10.Font = new System.Drawing.Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.label10.Location = new System.Drawing.Point(7, 104);
			this.label10.Name = "label10";
			this.label10.Size = new Size(235, 23);
			this.label10.TabIndex = 156;
			this.label10.Text = "THÔNG TIN VỀ SẢN PHẨM :  ";
			this.label10.TextAlign = ContentAlignment.MiddleRight;
			this.lblProduct.Anchor = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right);
			this.lblProduct.Enabled = false;
			this.lblProduct.FlatAppearance.BorderSize = 0;
			this.lblProduct.FlatStyle = FlatStyle.Flat;
			this.lblProduct.Font = new System.Drawing.Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.lblProduct.Location = new System.Drawing.Point(237, 106);
			this.lblProduct.Name = "lblProduct";
			this.lblProduct.Size = new Size(183, 20);
			this.lblProduct.TabIndex = 162;
			this.lblProduct.Text = "SẢN PHẨM";
			this.lblProduct.UseVisualStyleBackColor = true;
			this.lblPrice.Anchor = (AnchorStyles.Top | AnchorStyles.Right);
			this.lblPrice.Enabled = false;
			this.lblPrice.FlatAppearance.BorderSize = 0;
			this.lblPrice.FlatStyle = FlatStyle.Flat;
			this.lblPrice.Font = new System.Drawing.Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.lblPrice.Location = new System.Drawing.Point(655, 106);
			this.lblPrice.Name = "lblPrice";
			this.lblPrice.Size = new Size(84, 20);
			this.lblPrice.TabIndex = 160;
			this.lblPrice.Text = "ĐƠN GIÁ";
			this.lblPrice.UseVisualStyleBackColor = true;
			this.lblMoney.Anchor = (AnchorStyles.Top | AnchorStyles.Right);
			this.lblMoney.Enabled = false;
			this.lblMoney.FlatAppearance.BorderSize = 0;
			this.lblMoney.FlatStyle = FlatStyle.Flat;
			this.lblMoney.Font = new System.Drawing.Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.lblMoney.Location = new System.Drawing.Point(832, 106);
			this.lblMoney.Name = "lblMoney";
			this.lblMoney.Size = new Size(109, 20);
			this.lblMoney.TabIndex = 161;
			this.lblMoney.Text = "THÀNH TIỀN";
			this.lblMoney.UseVisualStyleBackColor = true;
			this.lblNumber.Anchor = (AnchorStyles.Top | AnchorStyles.Right);
			this.lblNumber.Enabled = false;
			this.lblNumber.FlatAppearance.BorderSize = 0;
			this.lblNumber.FlatStyle = FlatStyle.Flat;
			this.lblNumber.Font = new System.Drawing.Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.lblNumber.Location = new System.Drawing.Point(740, 106);
			this.lblNumber.Name = "lblNumber";
			this.lblNumber.Size = new Size(91, 20);
			this.lblNumber.TabIndex = 159;
			this.lblNumber.Text = "SỐ LƯỢNG";
			this.lblNumber.UseVisualStyleBackColor = true;
			this.lblUnit.Anchor = (AnchorStyles.Top | AnchorStyles.Right);
			this.lblUnit.Enabled = false;
			this.lblUnit.FlatAppearance.BorderSize = 0;
			this.lblUnit.FlatStyle = FlatStyle.Flat;
			this.lblUnit.Font = new System.Drawing.Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.lblUnit.Location = new System.Drawing.Point(524, 106);
			this.lblUnit.Name = "lblUnit";
			this.lblUnit.Size = new Size(129, 20);
			this.lblUnit.TabIndex = 158;
			this.lblUnit.Text = "ĐƠN VỊ TÍNH";
			this.lblUnit.UseVisualStyleBackColor = true;
			this.lblPacket.Anchor = (AnchorStyles.Top | AnchorStyles.Right);
			this.lblPacket.Enabled = false;
			this.lblPacket.FlatAppearance.BorderSize = 0;
			this.lblPacket.FlatStyle = FlatStyle.Flat;
			this.lblPacket.Font = new System.Drawing.Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.lblPacket.Location = new System.Drawing.Point(421, 106);
			this.lblPacket.Name = "lblPacket";
			this.lblPacket.Size = new Size(102, 20);
			this.lblPacket.TabIndex = 157;
			this.lblPacket.Text = "SỐ LÔ";
			this.lblPacket.UseVisualStyleBackColor = true;
			this.txtMoney.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
			this.txtMoney.BackColor = Color.FromArgb(255, 255, 192);
			this.txtMoney.BorderStyle = BorderStyle.FixedSingle;
			this.txtMoney.Font = new System.Drawing.Font("Arial", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.txtMoney.ForeColor = Color.FromArgb(0, 0, 192);
			this.txtMoney.Location = new System.Drawing.Point(834, 509);
			this.txtMoney.Name = "txtMoney";
			this.txtMoney.ReadOnly = true;
			this.txtMoney.Size = new Size(106, 22);
			this.txtMoney.TabIndex = 164;
			this.txtMoney.Text = "0";
			this.txtMoney.TextAlign = HorizontalAlignment.Right;
			this.txtMoney.TextChanged += new EventHandler(this.txtMoney_TextChanged);
			this.label27.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
			this.label27.AutoSize = true;
			this.label27.BackColor = SystemColors.ActiveCaption;
			this.label27.Font = new System.Drawing.Font("Arial", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.label27.ForeColor = SystemColors.MenuText;
			this.label27.Location = new System.Drawing.Point(747, 537);
			this.label27.Name = "label27";
			this.label27.Size = new Size(84, 16);
			this.label27.TabIndex = 163;
			this.label27.Text = "Thành tiền :";
			this.btnExport.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.btnExport.Font = new System.Drawing.Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnExport.Location = new System.Drawing.Point(665, 566);
			this.btnExport.Name = "btnExport";
			this.btnExport.Size = new Size(98, 30);
			this.btnExport.TabIndex = 956;
			this.btnExport.Text = "Xuất File [F10]";
			this.btnExport.UseVisualStyleBackColor = true;
			this.btnExport.Click += new EventHandler(this.btnExport_Click);
			this.txtProductPrice1.Anchor = (AnchorStyles.Top | AnchorStyles.Right);
			this.txtProductPrice1.BackColor = Color.White;
			this.txtProductPrice1.Font = new System.Drawing.Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.txtProductPrice1.Location = new System.Drawing.Point(887, 129);
			this.txtProductPrice1.Name = "txtProductPrice1";
			this.txtProductPrice1.ReadOnly = true;
			this.txtProductPrice1.Size = new Size(10, 22);
			this.txtProductPrice1.TabIndex = 957;
			this.txtProductPrice1.TextAlign = HorizontalAlignment.Right;
			this.txtProductPrice2.Anchor = (AnchorStyles.Top | AnchorStyles.Right);
			this.txtProductPrice2.BackColor = Color.White;
			this.txtProductPrice2.Font = new System.Drawing.Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.txtProductPrice2.Location = new System.Drawing.Point(753, 129);
			this.txtProductPrice2.Name = "txtProductPrice2";
			this.txtProductPrice2.ReadOnly = true;
			this.txtProductPrice2.Size = new Size(84, 22);
			this.txtProductPrice2.TabIndex = 958;
			this.txtProductPrice2.TextAlign = HorizontalAlignment.Right;
			this.btnStopSlide.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.btnStopSlide.BackColor = Color.White;
			this.btnStopSlide.FlatAppearance.BorderColor = Color.Silver;
			this.btnStopSlide.FlatStyle = FlatStyle.Flat;
			this.btnStopSlide.Font = new System.Drawing.Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnStopSlide.Location = new System.Drawing.Point(666, 567);
			this.btnStopSlide.Name = "btnStopSlide";
			this.btnStopSlide.Size = new Size(141, 29);
			this.btnStopSlide.TabIndex = 1558;
			this.btnStopSlide.Text = "Dừng xem";
			this.btnStopSlide.UseVisualStyleBackColor = false;
			this.btnStopSlide.Visible = false;
			this.btnStopSlide.Click += new EventHandler(this.btnStopSlide_Click);
			this.timer2.Interval = 1000;
			this.timer2.Tick += new EventHandler(this.timer2_Tick);
			this.timer1.Tick += new EventHandler(this.timer1_Tick);
			base.AutoScaleDimensions = new SizeF(7f, 15f);
			//base.AutoScaleMode = AutoScaleMode.Font;
			base.ClientSize = new Size(950, 600);
			base.Controls.Add(this.btnStopSlide);
			base.Controls.Add(this.btnExport);
			base.Controls.Add(this.txtMoney);
			base.Controls.Add(this.label27);
			base.Controls.Add(this.lblProduct);
			base.Controls.Add(this.lblPrice);
			base.Controls.Add(this.lblMoney);
			base.Controls.Add(this.lblNumber);
			base.Controls.Add(this.lblUnit);
			base.Controls.Add(this.label10);
			base.Controls.Add(this.lblPacket);
			base.Controls.Add(this.btnListUnit);
			base.Controls.Add(this.txtProductPrice);
			base.Controls.Add(this.btnSelect);
			base.Controls.Add(this.txtProductNumber);
			base.Controls.Add(this.cbbPacket);
			base.Controls.Add(this.txtProductUnit);
			base.Controls.Add(this.txtProductName);
			base.Controls.Add(this.label9);
			base.Controls.Add(this.groupBox4);
			base.Controls.Add(this.label20);
			base.Controls.Add(this.txtNote);
			base.Controls.Add(this.txtMoneyAfterDiscount);
			base.Controls.Add(this.txtDiscountOut);
			base.Controls.Add(this.label22);
			base.Controls.Add(this.btnSearch);
			base.Controls.Add(this.groupBox3);
			base.Controls.Add(this.txtTotalMoney);
			base.Controls.Add(this.label7);
			base.Controls.Add(this.cbbNational);
			base.Controls.Add(this.btnClose);
			base.Controls.Add(this.btnDel);
			base.Controls.Add(this.label18);
			base.Controls.Add(this.btnPrint);
			base.Controls.Add(this.btnSave);
			base.Controls.Add(this.btnEdit);
			base.Controls.Add(this.btnAdd);
			base.Controls.Add(this.groupBox1);
			base.Controls.Add(this.label26);
			base.Controls.Add(this.txtProductPrice1);
			base.Controls.Add(this.dgvProduct);
			base.Controls.Add(this.txtBalancerAllPacket);
			base.Controls.Add(this.lblPossName);
			base.Controls.Add(this.label3);
			base.Controls.Add(this.btnAddToBill);
			base.Controls.Add(this.txtProductPrice2);
			base.Controls.Add(this.dtpProductDate);
			base.Controls.Add(this.label16);
			base.Controls.Add(this.label15);
			base.Controls.Add(this.dptProductExpiryDate);
			base.Controls.Add(this.txtBalancer);
			base.Controls.Add(this.label21);
			base.Controls.Add(this.txtProductMoney);
			base.Controls.Add(this.label12);
			base.Controls.Add(this.dgvBill);
			this.Font = new System.Drawing.Font("Arial", 9f, FontStyle.Regular, GraphicsUnit.Point, 0);
			//base.Icon = (System.Drawing.Icon)componentResourceManager.GetObject("$this.Icon");
			//base.Icon = (System.Drawing.Icon)componentResourceManager.GetObject("$this.Icon");
			base.KeyPreview = true;
			base.Name = "frmStockForward";
			base.ShowInTaskbar = false;
			base.StartPosition = FormStartPosition.CenterScreen;
			this.Text = "XUẤT CHUYỂN KHO";
			base.WindowState = FormWindowState.Maximized;
			base.Load += new EventHandler(this.frmInput_Load);
			base.Shown += new EventHandler(this.frmOutput_Shown);
			base.FormClosing += new FormClosingEventHandler(this.frmOutput_FormClosing);
			base.KeyDown += new KeyEventHandler(this.frmInput_KeyDown);
			this.groupBox1.ResumeLayout(false);
			this.groupBox1.PerformLayout();
			((ISupportInitialize)this.dgvProduct).EndInit();
			this.cmsBill.ResumeLayout(false);
			((ISupportInitialize)this.dgvBill).EndInit();
			this.ctmJustBill.ResumeLayout(false);
			this.groupBox3.ResumeLayout(false);
			this.groupBox3.PerformLayout();
			this.groupBox4.ResumeLayout(false);
			this.groupBox4.PerformLayout();
			base.ResumeLayout(false);
			base.PerformLayout();
		}
	}
}
